I have the following sample .csv file:
str_header int_header
string_a 1
string_b 2
string_c 3
According to solutions on the internet, this code:
import pandas as pd
data = pd.read_csv("z.csv", names=['int_header'])
print(data['int_header'])
should only read int_header column into data. But data, when printed as above, actually contains all of the file columns. I'm using Anaconda distribution of Python. What's wrong?