convert list of strings in a column into separated columns Python

I have a column named (events) comes from csv file, I have loaded csv into dataframe. This column contains the events of each soccer match: here is an example: sample of data

enter image description here

I need each key to be a column and the rows will be its value to be like:


event_team  event_time  event_type ....
home         34          Yellow card
away         14          Goal
....

this is a sample file Sample from data how can I do it please ?



from Recent Questions - Stack Overflow https://ift.tt/3foYHZ4
https://ift.tt/3C0X90W

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)