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

Popular posts from this blog

c# SetCompatibleTextRenderingDefault must be called before the first -

How to prevent logback from emitting repeated "Empty watch file list. Disabling" messages -

c++ - Fill runtime data at compile time with templates -