I have a dynamic DataFrame which works fine, but when there are no data to be added into the DataFrame I get an error. And therefore I need a solution to create an empty DataFra
Are you looking for something like this?
COLUMN_NAMES=['A','B','C','D','E','F','G'] df = pd.DataFrame(columns=COLUMN_NAMES) df.columns Index(['A', 'B', 'C', 'D', 'E', 'F', 'G'], dtype='object')