Why does Pandas say this data frame has only one column?
I began a python course in linear and logistic regression but I am encountering what is probably a stupid error. I have to work with this data frame:
And this is my code:
import numpy as np import pandas as pd import matplotlib.pyplot as plt rwq = pd.read_csv('*filepath*/winequality-red.csv') rows = len(rwq.index) cols = rwq.shape
When I print rows and cols, rows correctly prints 1599 but for some reason cols always equals 1 (when in fact they are 12).
I also tried 'len(rwq.columns)' and I still get 1.
Am I doing something wrong or is the problem with the file provided?