Answers for "how to load dataset in pandas"

0

load dataset X = pd.DataFrame(data.data, columns=data.features)

from sklearn.datasets import load_iris
import pandas as pd

data = load_iris()
df = pd.DataFrame(data.data, columns=data.feature_names)
df.head()
Posted by: Guest on August-20-2020
2

read a csv file in pandas

you should be in the same dir as .py file 

df = pd.read_csv('your_file_name.csv')
Posted by: Guest on May-11-2020

Code answers related to "how to load dataset in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language