Skip to content

Instantly share code, notes, and snippets.

@Se7enSquared
Created August 12, 2021 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Se7enSquared/2a85e46c0da435f4d4147bddbf888f20 to your computer and use it in GitHub Desktop.
Save Se7enSquared/2a85e46c0da435f4d4147bddbf888f20 to your computer and use it in GitHub Desktop.
def build_character_seperated_string_from_pd_series(series):
"""iterates through a pandas series (column) and creates comma seperted string from the values
Returns:
string: a comma seperated list of values in the series as a string
"""
str1 = ''
for cell in series:
str1 = str1 + cell + ";"
return str1[:-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment