I'm trying to create some charts using Python. I've this dataset in a CSV file:
Banana Water Rice Rice Water Bread Banana Juice
And I've this code:
import numpy as np from pandas import DataFrame import matplotlib matplotlib.use('agg') # Write figure to disk instead of displaying (for Windows Subsystem for Linux) import matplotlib.pyplot as plt data = DataFrame.read_csv("test.csv", index_col=1, skiprows=1).T.to_dict()
But when I execute the code I'm getting the following error:
AttributeError: type object 'DataFrame' has no attribute 'read_csv'
How can I solve this problem?