Create Empty DataFrame

To create an empty DataFrame in Pandas, call pandas.DataFrame() constructor and pass no argument to it.

In this tutorial, we will learn how to create an empty DataFrame in Pandas using DataFrame() constructor.

Example

In the following program, we create an empty DataFrame and print it to console.

Example.py

import pandas as pd

df = pd.DataFrame()
print(df)
Try Online

Output

Empty DataFrame
Columns: []
Index: []
ADVERTISEMENT

Conclusion

In this Pandas Tutorial, we learned how to create an empty DataFrame using DataFrame() constructor.