DataFrame#
Constructor#
|
Attributes and underlying data#
Axes
Return the dtypes in the DataFrame. |
|
|
Return a subset of the DataFrame's columns based on the column dtypes. |
Return an int representing the number of axes / array dimensions. |
|
Conversion#
|
Cast a pandas object to a specified dtype |
Indexing, iteration#
|
Return the first n rows. |
|
Insert column into DataFrame at specified location. |
|
Return item and drop from frame. |
|
Query the columns of a DataFrame with a boolean expression. |
Binary operator functions#
|
Get Addition of dataframe and other, element-wise (binary operator add). |
|
Get Subtraction of dataframe and other, element-wise (binary operator subtract). |
|
Get Multiplication of dataframe and other, element-wise (binary operator mul). |
|
Get Floating division of dataframe and other, element-wise (binary operator truediv). |
|
Get Floating division of dataframe and other, element-wise (binary operator truediv). |
|
Get Integer division of dataframe and other, element-wise (binary operator floordiv). |
|
Get Modulo of dataframe and other, element-wise (binary operator mod). |
|
Get Exponential power of dataframe and other, element-wise (binary operator pow). |
|
Get Addition of dataframe and other, element-wise (binary operator radd). |
|
Get Subtraction of dataframe and other, element-wise (binary operator rsubtract). |
|
Get Multiplication of dataframe and other, element-wise (binary operator rmul). |
|
Get Floating division of dataframe and other, element-wise (binary operator rtruediv). |
|
Get Floating division of dataframe and other, element-wise (binary operator rtruediv). |
|
Get Integer division of dataframe and other, element-wise (binary operator rfloordiv). |
|
Get Modulo of dataframe and other, element-wise (binary operator rmod). |
|
Get Exponential power of dataframe and other, element-wise (binary operator rpow). |
|
Get Less than of dataframe and other, element-wise (binary operator lt). |
|
Get Greater than of dataframe and other, element-wise (binary operator gt). |
|
Get Less than or equal to of dataframe and other, element-wise (binary operator le). |
|
Get Greater than or equal to of dataframe and other, element-wise (binary operator ge). |
|
Get Not equal to of dataframe and other, element-wise (binary operator ne). |
|
Get Equal to of dataframe and other, element-wise (binary operator eq). |
Function application, GroupBy & window#
|
Apply a function along an axis of the DataFrame. |
|
|
|
|
|
|
|
Call |
Computations / descriptive stats#
|
|
|
|
|
|
|
|
|
Evaluate a string describing operations on DataFrame columns. |
|
|
|
|
|
|
|
|
|
Count distinct observations over requested axis. |
|
Percentage change between the current and a prior element. |
|
|
|
|
|
Return values at the given quantile over requested axis. |
|
Round a DataFrame to a variable number of decimal places. |
|
|
|
|
|
|
|
|
|
Reindexing / selection / label manipulation#
|
Prefix labels with string prefix. |
|
Suffix labels with string suffix. |
|
Drop specified labels from rows or columns. |
|
Return DataFrame with duplicate rows removed. |
|
Return boolean Series denoting duplicate rows. |
|
Return the first n rows. |
|
Alter axes labels. |
|
Set the name of the axis for the index or columns. |
|
Reset the index, or a level of it. |
|
Return a random sample of items from an axis of object. |
|
Assign desired index to given axis. |
|
Set the DataFrame index using existing columns. |
|
Return the last n rows. |
Missing data handling#
Detect missing values. |
|
Detect missing values. |
|
Detect existing (non-missing) values. |
|
Detect existing (non-missing) values. |
Reshaping, sorting, transposing#
|
Sort by the values along either axis. |
|
Sort object by labels (along an axis). |
Combining / joining / merging#
|
Join columns of another DataFrame. |
|
Merge DataFrame or named Series objects with a database-style join. |
Plotting#
DataFrame.plot
is both a callable method and a namespace attribute for
specific plotting methods of the form DataFrame.plot.<kind>
.
alias of |
|
Draw a stacked area plot. |
|
Vertical bar plot. |
|
Make a horizontal bar plot. |
|
Make a box plot of the DataFrame columns. |
|
Generate Kernel Density Estimate plot using Gaussian kernels. |
|
Generate a hexagonal binning plot. |
|
Draw one histogram of the DataFrame's columns. |
|
Generate Kernel Density Estimate plot using Gaussian kernels. |
|
Plot Series or DataFrame as lines. |
|
Generate a pie plot. |
|
Create a scatter plot with varying marker point size and color. |
Serialization / IO / conversion#
|
Write DataFrame object into a MaxCompute (ODPS) table. |
|
MaxFrame Extensions#
|
Apply a function that takes pandas DataFrame and outputs pandas DataFrame/Series. |
|
Apply the given function to each row and then flatten results. |
|
Shuffle data in DataFrame or Series to make data distribution more randomized. |
DataFrame.mf
provides methods unique to MaxFrame. These methods are collated from application
scenarios in MaxCompute and these can be accessed like DataFrame.mf.<function/property>
.