verbs module¶
selecting / filtering / ordering¶
|
select dataframe columns |
|
where/filter dataframe rows |
|
order/sequence dataframe |
data analysis / review¶
|
show column/category/factor frequency |
|
show first n records of a dataframe. |
|
show dataframe meta data |
|
show dataframe consumed memory (mb) |
|
show sample data |
|
show last n records of a dataframe |
column management¶
|
Clean column names, strip blanks, lowercase, snake_case. |
|
show dataframe column information |
|
drop column(s) |
|
drop columns containing blanks, zeros or na |
|
Flatten multi-index column headings |
|
move column(s) in a dataframe |
|
rename dataframe col(s) |
|
replace column names (or partially) with dictionary values |
|
promote row(s) to column name(s) |
|
set dataframe column names |
data cleaning¶
|
select distinct/unique rows |
|
locate duplicate data |
|
Analyse dataframe rows with overlapping date periods |
|
check for non-alphanumeric characters |
assign/update column(s)¶
|
Apply function across multiple columns |
|
Assign new columns to a DataFrame. |
string functions¶
|
clean number (e.g. |
|
join or combine columns with a separator |
|
split column |
|
strip leading/trailing blanks |
joining data¶
|
df (All) | df2 (All) matching records only |
|
df (All) | df2 (All/na) df always returned |
|
df (All/na) | df2 (All) df2 always returned |
|
df (All/na) | df2 (All/na) All rows returned |
aggregation¶
|
add totals to a dataframe |
|
Group by dataframe |
|
summarise or aggregate data. |
|
Add a group calculation to grouped DataFrame |
reshaping data¶
|
Transform list-like column values to rows |
|
pivot dataframe wide to long |
|
create Excel like pivot table |
|
Split dataframe by chunk_size rows, returning multiple dataframes |
|
stack dataframe |
|
Summarise a dictionary of dataframes. |
|
unstack dataframe |
index management¶
|
format dataframe datelike index |
|
rename dataframe axis |
|
reset_index dataframe |
|
set_index dataframe |