Trying to pass user input in usecols Pandas

You can pass the col list as the answer to the usecols parameter.

col_list = [0, 1]
df = pd.read_csv(filename, usecols = col_list, index_col=False, header=1)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top