I'm wondering how to have the keys be the column headers (Result, IP, time)?
Data in CSV looks like this:
"Result":"Success","IP":"0.0.0.0","time":"2018-08-20T12:00:00.000Z" "Result":"Failure","IP":"1.1.1.1","time":"2018-08-20T12:01:00.000Z" I'd like to format it like this:
Result IP time Success 0.0.0.0 2018-08-20T12:00:00.000Z Failure 1.1.1.1 2018-08-20T12:01:00.000Z My code so far:
import pandas as pd file = pd.read_csv("path_to.csv", sep='\n', names = ["Result","IP","time"]) df = pd.DataFrame(file) print(df.head(1))