datopy.inspection.make_df#
- make_df( ) DataFrame[source]#
Quickly make a DataFrame.
- Parameters:
cols (Iterable[Any]) – Iterable with items representing column names.
ind (Iterable[Any]) – Iterable with items representing row names.
- Returns:
result
- Return type:
DataFrame of shape (len(ind), len(cols))
Examples
>>> from datopy.inspection import make_df
>>> import pandas as pd >>> make_df("ABC", [1,2,3]) A B C 1 A1 B1 C1 2 A2 B2 C2 3 A3 B3 C3
>>> make_df([1,2,3], ("A", "B", "C")) 1 2 3 A 1A 2A 3A B 1B 2B 3B C 1C 2C 3C