Reputation: 88
I am using following python code to read csv file data :
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn import preprocessing
df = pd.read_csv("D:\Projects\BehaviorMining\breast-cancer.csv")
It returns error
OSError: [Errno 22] Invalid argument: 'D:\Projects\BehaviorMining\x08reast-cancer.csv'
I thought csv file has problem ,because some csv files has no problem with above syntax , but I didn't find any problem in csv file.
Thanks for any guides
Upvotes: 1
Views: 790
Reputation: 311
Just use single quotation marks only or use 'r' raw string upfront and a single '/'. For example
df = pd.read_csv(r'D:\Projects\BehaviorMining\breast-cancer.csv')
Upvotes: 2