# Sara Bareilles – Careful Confessions.rar ✅

Sara Bareilles – Careful Confessions.rar

careful confessions Torrent cranked up the Big Bang’s camp music, it felt like a million dollars being there for the closest thing to a passing of a franchise, a link to the past.Q:

How to convert integer to String in Dataframe?

I have dataframe with columns NN,NNN,NNNN,…
I need to convert integer that is present in column NNN to string.
For e.g. NNN contains 120, 22,113345, 234,23,76,45
Expected Output – Column ‘N’ should be string with above values.
Column ‘N’ should be string 120,22,113345,234,23,76,45

A:

You could use Series.str.extract to extract elements from the value column which are strings with length one and then explode them. If the strings to be extracted are ordered (as it is in your example), then by using groupby we sort the elements before extracting them from the DataFrame.
df[‘N’] = df[‘NNN’].str.extract(‘(\d+)’, expand=True)
#sortN = df.groupby(‘N’)[‘N’].transform(‘unique’)
df.loc[df[‘N’].str.extract(‘(\d+)’, expand=True).sort_values().index] =\
df[‘N’].str.split(expand=True).explode()

Output:
N NNN NNNN NNNNN
0 120 22 113345 234
1 23 76 45