I have a bunch of strings stored in a field called bio
in a df called df_info
. Some of them have multiple lines in their strings as such:
Journalist and Reporter
Baltimore Girl Living In A Nashville World
Surviving Off Of Target Pick Up, Coffee & My Fave Playlists ☕️ #Debtfreeliving
Others are already one line like such:
Professional basketball blogger and dog mom
I am trying to get all of the fields in bio
to be one readable text line so that the first example looks like this:
Journalist and Reporter Baltimore Girl Living In A Nashville World Surviving Off Of Target Pick Up, Coffee & My Fave Playlists ☕️ #Debtfreeliving
I've tried using previous answers to similar questions like this:
df_info.bio = str.join(" ", df_info.bio.splitlines())
But it tells me: AttributeError: 'Series' object has no attribute 'splitlines'