I am trying to add a column with a constant value to a dataframe that does not have any rows. It appears this isn't as easy as it would be if the rows were populated. How would one accomplish this?
df = pd.DataFrame(columns = ['a','b','c'])
df['foo'] = 'bar'
Should yield
a b c foo
0 NaN NaN NaN bar
instead it yields
a b c
Empty DataFrame Columns: [a, b, c, foo] Index: []