I converted a JSON file into a Pandas dataframe.
I want to flatten the 'pos' column into the following columns and filter it:
What should I do?
CodePudding user response:
You can use:
df['word']=df['pos'].apply(lambda x: x[4]['word'])
df['tag']=df['pos'].apply(lambda x: x[3])