QUESTION : When i try to run "from pandas import read_csv
" or "from pandas import DataFrame
", I get an error saying "ImportError: cannot import name 'read_csv'
" and "[![ImportError: cannot import name 'DataFrame'][1]][1]
" respectively.
CODE THAT I AM TRYING TO RUN:
from pandas import DataFrame
from sklearn import datasets
iris = datasets.load_iris()
data = pandas.DataFrame(iris)
kfold = KFold(10, True, 1)
for train, test in kfold.split(data):
print('train: %s, test: %s' % (data[train], data[test]))
WHAT I TRIED : I checked each and every import error question on stackoverflow and github but I couldn't figure out the solution. I don't have any other file named pandas.py. I tried uninstalling and reinstalling all the packages(like scipy, scikit-learn, numpy, pandas) I tried updating all the packages, but no luck Application specifications that i have - Windows 10, version 1803, Anaconda 4.5.8, spyder 3.3.0
Infact, none of my other code, which was running successfully previously, isn't executing because of these ImportErrors. Any help would be much appreciated. Thanks!