pandas.DataFrame.dtypes

Return.: the dtypes in the DataFrame.

This returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns. Columns with mixed types are stored with the object dtype. See the User Guide for more.

pandas.DataFrame.astype

Cast a pandas object to a specified dtype dtype.

pandas.DataFrame.isna

Detect missing values.

Return: a boolean same-sized object indicating if the values are NA. NA values, such as None or numpy.NaN, gets mapped to True values. Everything else gets mapped to False values. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True).

 

Returns : DataFrame

Mask of bool values for each element in DataFrame that indicates whether an element is not an NA value.

pandas.DataFrame.notna

Detect existing (non-missing) values.

Return:  a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy.NaN, get mapped to False values.

 

Returns: DataFrame

Mask of bool values for each element in DataFrame that indicates whether an element is not an NA value.

pandas.DataFrame.head

Return :  the first n rows.

This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it.

For negative values of n, this function returns all rows except the last n rows, equivalent to df[:-n].

 

Parametersn : int, default 5

                     Number of rows to select.

Returns : same type as caller

                     The first n rows of the caller object.

pandas.DataFrame.apply

DataFrame.apply(self, func, axis=0, raw=False, result_type=None, args=(), **kwds)

Apply a function along an axis of the DataFrame.

 

Objects passed to the function are Series objects whose index is either the DataFrame’s index (axis=0) or the DataFrame’s columns (axis=1). By default (result_type=None), the final return type is inferred from the return type of the applied function. Otherwise, it depends on the result_type argument.

 

Parameters : 

func : function

Function to apply to each column or row.

 

axis : {0 or ‘index’, 1 or ‘columns’}, default 0

Axis along which the function is applied:

  • 0 or ‘index’: apply function to each column.

  • 1 or ‘columns’: apply function to each row.

raw : bool, default False

Determines if row or column is passed as a Series or ndarray object:

  • False : passes each row or column as a Series to the function.

  • True : the passed function will receive ndarray objects instead. If you are just applying a NumPy reduction function this will achieve much better performance.

result_type : {‘expand’, ‘reduce’, ‘broadcast’, None}, default None

These only act when axis=1 (columns):

  • ‘expand’ : list-like results will be turned into columns.

  • ‘reduce’ : returns a Series if possible rather than expanding list-like results. This is the opposite of ‘expand’.

  • ‘broadcast’ : results will be broadcast to the original shape of the DataFrame, the original index and columns will be retained.

The default behaviour (None) depends on the return value of the applied function: list-like results will be returned as a Series of those. However if the apply function returns a Series these are expanded to columns.

New in version 0.23.0.

 

args : tuple

Positional arguments to pass to func in addition to the array/series.

**kwds :

Additional keyword arguments to pass as keywords arguments to func.

 

Returns : Series or DataFrame

                Result of applying func along the given axis of the DataFrame.

pandas.DataFrame.isin

Whether each element in the DataFrame is contained in values.

Parametersvaluesiterable, Series, DataFrame or dict

 

The result will only be true at a location if all the labels match. If values is a Series, that’s the index. If values is a dict, the keys must be the column names, which must match. If values is a DataFrame, then both the index and column labels must match.

 

Returns : DataFrame

DataFrame of booleans showing whether each element in the DataFrame is contained in values.

pandas.DataFrame.transform

Call func on self producing a DataFrame with transformed values.

Produced DataFrame will have same axis length as self.

 

Parametersfuncfunction, str, list or dict

Function to use for transforming the data. If a function, must either work when passed a DataFrame or when passed to DataFrame.apply.

Accepted combinations are:

  • function

  • string function name

  • list of functions and/or function names, e.g. [np.exp. 'sqrt']

  • dict of axis labels -> functions, function names or list of such.

axis{0 or ‘index’, 1 or ‘columns’}, default 0

If 0 or ‘index’: apply function to each column. If 1 or ‘columns’: apply function to each row.

*args

Positional arguments to pass to func.

**kwargs

Keyword arguments to pass to func.

 

Returns : DataFrame

A DataFrame that must have the same length as self.

pandas.DataFrame.groupby

pandas.DataFrame.describe

출처 : https://pandas.pydata.org/pandas-docs/stable/reference/frame.html

+ Recent posts