type(df['Soft_skills'][0])
>>>str
I need to output like
df['Soft_skills'][0] = Management,Decision Making
and for second row
df['Soft_skills'][1] = None
I don't know how can I remove "
and covert it into str
format.
>>> df['Soft_skills']
0 ["Management", "Decision Making"]
1 []
2 ["Management"]
3 []
4 ["Governance", "Management", "Leadership", "Te...
...
1229 []
1230 []
1231 []
1232 ["Agenda (Meeting)", "Governance"]
1233 []
Name: Soft_skills, Length: 1234, dtype: object
In some cases data is
The syllabus for this course will cover the following:, \n, *, The nature and purpose of cost and management accounting, \n, *, Source documents and coding, \n, *, Cost classification and measuring, \n, *, Recording costs, \n, *, Spreadsheets
I replace this by using
d = {
'Not Mentioned':'',
"\r\n": "\n",
"\r": "\n",
'\u00a0':' ',
': \n, *, ':'\n * ',
' \n,':'\n',
}
df=df.replace(d.keys(),d.values(),regex=True)
but nothing replaces what is the problem when I'm trying is there anything I missing? I used also this
df['Course_content'] = df['Course_content']\
.str.replace('Not Mentioned','')\
.str.replace("\r\n", "\n")\
.str.replace("\r", "\n")\
.str.replace('\u00a0',' ')\
.str.replace(', \n, *, ','\n * ')\
.str.replace(' \n,','\n')
but it also not working for me