I was wondering what is the difference between, and what are the pros and cons for, setting a constant value in a new column in a dataframe using the two different approaches below:
The first being directly assigning a value to a column
df["column"] = "value"
The second using .loc
df.loc[:, "column"] = "value"
Thanks!