python - Reading CSV file in WinPython -
i want merge 2 csv files in spyder,
import pandas pd data1 = pd.readcsv('c:/rdata/plant1.csv') data2 = pd.readcsv('c:/rdata/species.csv') newdata = pd.merge(data1, data2, on='speies')
but got error:
………………………………, line 9, in <module> data1 = pd.readcsv('c:/rdata/plant1.csv') attributeerror: 'module' object has no attribute 'readcsv'
how can fix problem?
obviously there not function named 'readcsv'. read_csv.
import pandas pd data1 = pd.read_csv('c:/rdata/plant1.csv') data2 = pd.read_csv('c:/rdata/species.csv') newdata = pd.merge(data1, data2, on='speies')
Comments
Post a Comment