I have created a dataframe on my local machine like so:
df1 = pd.DataFrame()
Next, I have added to columns to dataframe plus I want to assign a string to only one column. I am attempting to do this like so:
df1['DF_Name'] = 'test'
df1['DF_Date'] = ''
The columns get added successfully, but the string 'test' does not. When I apply this to other dataframe it works perfectly fine. What am I doing wrong?
I am also trying to append dates into the same dataframe except using logic, and that is also not working. Logic is as so:
if max_created > max_updated:
df1['DF_Date'] = max_created
else:
df1['DF_Date'] = max_updated
Not sure what I am doing wrong.
Thank you in advance.