简体   繁体   中英

The same Python script no error in Spyder but error in Sublime Text

I am just running a very simple script. It is working in Spyder but not in Sublime Text, I am so confused:

import pandas as pd

iris_df = pd.read_csv("data/iris.data") 

Error in Sublime Text:

FileNotFoundError: [Errno 2] File b'data/iris.data' does not exist: b'data/iris.data'

In Spyder, it may set to current working directly., so specifying the file name would be enough to execute the code. Whereas when you run from sublime, Atom etc.., you need to specify the complete file path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM