INNER CODE UNIT · Python

_convert_to_pandas

aeturrell/skimpy · src/skimpy/__init__.py:810

def _convert_to_pandas(df_in: pd.DataFrame | pl.DataFrame) -> pd.DataFrame:
    if isinstance(df_in, pl.DataFrame):
        df_out = df_in.to_pandas()
    else:
        df_out = df_in.copy()
    return df_out


@typechecked
def skim_get_data(
    df_in: pd.DataFrame | pl.DataFrame,
) -> JSON | str:
    """Skim a pandas or polars dataframe and return summary statistics as a dictionary, and without printing to the console.

    skim is an alternative to pandas.DataFrame.describe(), quickly providing
    an overview of a data frame via a table of summary statistics. It produces a different set of summary
    functions based on the types of columns in the dataframe. You may get
    better results from ensuring that you set the datatypes in your dataframe

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…