0
2 ['name:', 'Atlanta', 'GA:', 'Hartsfield-Jackson', 'Atlanta', 'International']
35 ['name:', 'Boston', 'MA:', 'Logan', 'International']
68 ['name:', 'Baltimore', 'MD:', 'Baltimore/Washington', 'International', 'Thurgood', 'Marshall']
101 ['name:', 'Charlotte', 'NC:', 'Charlotte', 'Douglas', 'International']
134 ['name:', 'Washington', 'DC:', 'Ronald', 'Reagan', 'Washington', 'National']
167 ['name:', 'Denver', 'CO:', 'Denver', 'International']
200 ['name:', 'Dallas/Fort', 'Worth', 'TX:', 'Dallas/Fort', 'Worth', 'International']
233 ['name:', 'Detroit', 'MI:', 'Detroit', 'Metro', 'Wayne', 'County']
266 ['name:', 'Newark', 'NJ:', 'Newark', 'Liberty', 'International']
299 ['name:', 'Fort', 'Lauderdale', 'FL:', 'Fort', 'Lauderdale-Hollywood', 'International']
332 ['name:', 'Washington', 'DC:', 'Washington', 'Dulles', 'International']
I have this series above and I want to split each row so that it lists everything like; Atlanta GA: Hartsfield-Jackson Atlanta International. This would be one column in a data frame. Essentially just want to remove the 'name:' at the beginning of each row and then split it so I have the form that I want. I have tried
my_series.str.split("'").str[7].reset_index(drop=True).astype(str)
But my output comes out to
0
0 Hartsfield-Jackson
1 Logan
2 Baltimore/Washington
3 Charlotte
4 Ronald
5 Denver
6 TX:
7 Detroit
8 Newark
9 FL:
10 Washington
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)