I have the following code:
import pandas as pd
df = pd.read_csv("myfile.csv", sep=';', header=0, encoding='latin_1')
The content of my CSV separted by semicolon
num_report; date_hour_ocorrence; Nº_involved; conductor; cod_severity;
2019-007782512-001;18/02/2019 19:24;3;Y;1
2019-007782515-001;20/02/2019 08:44;4;N;3
But when I try do this:
df.loc[df['conductor'] == 'S']
I got the error
KeyError: 'conductor'
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)