piper.verbs.info

piper.verbs.info(df, n_dupes: bool = False, fillna: bool = False, memory_info: bool = True)pandas.core.frame.DataFrame[source]

show dataframe meta data

Provides a summary of the structure of the dataframe data.

Examples

import numpy as np
import pandas as pd
from piper.verbs import info

np.random.seed(42)

id_list = ['A', 'B', 'C', 'D', 'E']
s1 = pd.Series(np.random.choice(id_list, size=5), name='ids')
s2 = pd.Series(np.random.randint(1, 10, s1.shape[0]), name='values')
df = pd.concat([s1, s2], axis=1)

       columns     type       n     isna     isnull     unique
   0   ids         object     5        0          0          3
   1   values      int64      5        0          0          4
Parameters
  • df – a pandas dataframe

  • n_dupes – default False. Column showing the numbers of groups of duplicate records

  • fillna – default: False. Filter out only columns which contain nulls/np.nan

  • memory – If True, show dataframe memory consumption in mb

Returns

Return type

A pandas dataframe