Skip to content

empty_df(columns, dtypes = [], index = None)

Creates an empty dataframe with the columns and data types as specified. Previously named df_empty

Parameters:

Name Type Description Default
columns list

list of columns names (list of str) .

required
dtypes list

list of data types. Can be numpy built in data types, pandas, or numpy.

[]
index list

Index name. Defaults to None. (If None : auto integer index corresponding to row numbers)

None

Todo

Add ability to create multi-index with that function

Returns:

Type Description
pd.DataFrame

The dataframe with the desired columns names and indices.

Back to top