I'm dealing with a csv that repeats its headers name within each rows:
player: John Doe ; level: 45 ; last_login: 7854414174 ; coins: 7600
player: Anckx Uj ; level: 471 ; last_login: 7854418847 ; coins: 684111
I'd like to know how I can only select the values when importing it using pandas so that the output looks like this:
Player level last_login coins
John Doe 45 7854414174 7600
Anckx Uj 471 7854418847 684111
I tried adding the header parameter as I thought it would filter out the repeating in the rows, without success.
import pandas as pd df = pd.read_csv('base.txt', sep=';', header=None, names=['player', 'level', 'last_login', 'coins']
returns me exactly the same thing as the csv (without the delimiter)
*Any help would be appreciated