Pandas#
As MACPie relies heavily on the pandas
library, a rich set of functions
that work with pandas.DataFrame
and pandas.Series
objects
were created and are provided through this API.
I/O Functions#
|
Parse a csv file into a |
|
Parse an Excel file into a |
|
Parse a file into a |
Selecting data#
|
Filters a |
|
Filter dataframe row or column labels. |
|
Filter row or column labels on a pair of dataframes. |
|
Get the properly-cased column name from |
|
Get the properly-cased columns names from |
|
Get columns that start with the prefixes. |
|
Removes trailing elements in a |
|
Trim trailing missing values from series. |
|
Trim trailing missing values from each series. |
|
Subset rows or columns of one or more DataFrames according to filtered labels. |
|
Subset rows or columns of a pair of dataframes according to filtered labels. |
Indexing#
|
Removes the |
|
Flatten (i.e. |
|
Adds a column to the end of the DataFrame |
|
Prepend a MultiIndex level. |
|
For any column names containing |
Describing data#
|
Adds a column whose values are the number of days between |
|
Return |
|
Counts trailing elements in a |
|
Check whether the provided array or dtype is of the datetime64 dtype. |
|
Create a column in |
Combining data#
|
Links data across two |
|
Merge |
Comparing data#
|
Compare two DataFrames and show the differences. |
|
Find the column differences between two DataFrames. |
|
Find the row differences between two DataFrames (that share the same columns). |
|
For testing equality of |
Converting data#
|
Conform one Dataframe to another. |
|
Cast column data types in |
|
Order the |
|
Convert |
Group by#
|
Given a |
Sorting Data#
|
Sort the pair of DataFrames using their common labels. |
Accessors#
Pandas allows adding additional “namespaces” to pandas objects to extend them.
MACPie adds the mac
namespace to pandas.DataFrame
and
pandas.Series
objects to provide access to many of these methods and more.
See the corresponding accessor classes to see which methods are available
via the mac
namespace.
DataFrame Accessor#
Methods on this accessor class are available on pandas.DataFrame
objects via the mac
namespace.
Custom DataFrame accessor to extend the |
Series Accessor#
Methods on this accessor class are available on pandas.Series
objects via the mac
namespace.
|
Custom Series accessor to extend the |