👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
How to create an empty dataframe with a given size in Python?
Use the following to create an empty dataframe with a given size (nRows x nCols
) in Python / Pandas:
import pandas as pd
df = pd.DataFrame(index=range(nRows),columns=range(nCols))