Issue
I have a string say
type(abc)
>>str
i want to convert it into pandas.core.series.Series.
i came across in pandas documentation that there is a code
pd.to_string()
which converts pandas series to string, but i want the opposit of it. is there any function/code to do it?
Solution
This is an implementation for casting a string to a series -
>>> abc = 'some string'
>>> import pandas as pd
>>> abc_series = pd.Series(abc)
>>> type(abc_series)
<class 'pandas.core.series.Series'>
Answered By - Vivek Kalyanarangan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.