I am totally new to Python (and pandas). I really tried to solve this problem, however, I couldn't solve it without getting the following warning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
I have two columns containing the first name and last name of a person. What I'm looking for is a way to add a new column to my data frame df containing the full name. This following code worked with warning:
df['Full Name'] = df['First Name'] + " " + df['Last Name']
Next, I tried
df.loc[:,'Full Name'] = df.loc[:,['First Name']] + " " + df.loc[:,['Last Name']],
which is invalid.