I am trying to take links and push them via TinyURL.. I have a dataframe containing Login Links column and I would like to take those individually and add to column 'Tiny URL', the tiny_urlize link.
for index, row in df.iterrows():
df.loc[index, 'Tiny Url'] = tiny_urlize(row['Login Link'])
The error I am getting looks like this:
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
but this is exactly what I am doing. Am I missing something?
dfitself a copy (e.g. did you do at some point beforedf = other_df[some_slice]?df?df = df.drop_duplicates()could be the culprit.