how to empty a pd dataframe code example
Example 1: create empty pandas dataframe
df = pd.DataFrame(columns=['a', 'b', 'c'])
Example 2: how to check for empty dataframe
df_empty = pd.DataFrame({'A' : []})
df_empty.empty # True
df = pd.DataFrame(columns=['a', 'b', 'c'])
df_empty = pd.DataFrame({'A' : []})
df_empty.empty # True