פונקציות pandas נפוצות#
categoy |
name |
use |
|---|---|---|
Creation |
||
create a new dataframe from numpy array/dictionary. Can provide row and column names |
||
create a new Series object from numpy array/dictionary. Can provide names |
||
read a dataframe from csv file |
||
write a dataframe to a csv file |
||
Basic information |
||
print a summary of the dataframe: column names, dtypes, number of existing (non Na) values, etc. |
||
return the first rows of a dataframe |
||
return the last rows of a dataframe |
||
return the random rows from a dataframe |
||
Data access |
||
get row labels of dataframe |
||
get column labels of dataframe |
||
get dataframe subset by labels |
||
get dataframe subset by position |
||
Manipulation |
||
remove rows or columns by label name |
||
apply a function on all rows/columns of a dataframe |
||
apply a function on all values in a dataframe |
||
sort table rows according to the values over a column, or table columns according to the values across a row |
||
Fusion |
||
concatanate dataframes along an axis |
||
merge the columns of two dataframes based on |
||
misc. |
||
split dataframe rows according to the values of some column. should be followed by a summary operation which will result in a single dataframe again |
||
Aggregation |
||
return the largest value along an axis |
||
return the smallest value along an axis |
||
return the index of the largest value along an axis |
||
return the index of the smallest value along an axis |
||
return the mean value along an axis |
||
return the median value along an axis |
||
return the sum total along an axis |
||
return the number of existing (not Na) values along an axis |