mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-08 17:34:37 +08:00
21 lines
366 B
Python
21 lines
366 B
Python
"""
|
|
Utilities for working with pandas objects.
|
|
"""
|
|
import pandas as pd
|
|
|
|
|
|
def explode(df):
|
|
"""
|
|
Take a DataFrame and return a triple of
|
|
|
|
(df.index, df.columns, df.values)
|
|
"""
|
|
return df.index, df.columns, df.values
|
|
|
|
|
|
try:
|
|
# pandas 0.16 compat
|
|
sort_values = pd.DataFrame.sort_values
|
|
except AttributeError:
|
|
sort_values = pd.DataFrame.sort
|