A given column a of a data frame df
contains strings with line-breaks. I split them into a list of strings via
df.a = df.a.str.split('\n', expand=False)
However, I get the 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
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy self[name] = value
However, I do not see any possibility to do it with .loc
as suggested in the warning or here.
Am I right?