on-internet
← Community

Import csv Python with Spyder

Stack Overflow ·

I am trying to import a csv file into Python but it doesn't seem to work unless I use the Import Data icon. I've never used Python before so apologies is I am doing something obviously wrong. I use R and I am trying to replicate the same tasks I do in R in Python. Here is some sample code: import pandas as pd import os as os Main_Path = "C:/Users/fan0ia/Documents/Python_Files" Area = "Pricing" Project = "Elasticity" Path = os.path.join(R_Files, Business_Area, Project) os.chdir(Path) #Read in the data Seasons = pd.read_csv("seasons.csv") Dep_Sec_Key = pd.read_csv("DepSecKey.csv") These files im

Comments

Sign in or sign up to comment and upvote.

No comments yet.