Thursday 9 January 2020

Fix TypeError: sequence item 3: expected string, float found

IIUC need convert to string with lambda function:
g=df1.groupby('Attribute_spcName')['Char_spcValue'].apply(lambda x: ', '.join(x.astype(str))

from : https://stackoverflow.com/questions/49359266/typeerror-sequence-item-3-expected-string-float-found

No comments:

Post a Comment