Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to set up dataframe from csv

import pandas as pd

column_names = ['sepel lengh', 'sepel width', 'petal lengh', 'petal width', 'class']
iris = pd.read_csv('iris.csv', names=column_names)

print(iris)
Comment

PREVIOUS NEXT
Code Example
Python :: ipython.display install 
Python :: sum of column in 2d array python 
Python :: how to merge more than 2 dataframes in python 
Python :: python remove first item in tuple 
Python :: Insert missing data in pandas 
Python :: how to take multiple input in list in python 
Python :: python close database connection 
Python :: python make directory tree from path 
Python :: flatten numpy array 
Python :: python not jump next line 
Python :: try except python 
Python :: reverse text python 
Python :: jupyter notebook add color text 
Python :: python split only last occurrence of a character 
Python :: smtpauthenticationerror 
Python :: python list of colors 
Python :: upgrade python wsl 
Python :: sort dict by value 
Python :: check if anything in a list is in a string python 
Python :: pandas rename column by index 
Python :: append to pandas dataframe 
Python :: datetime.datetime.fromtimestamp() 
Python :: loop append to list python 
Python :: python for else 
Python :: make linked list in python 
Python :: Conversion of number string to float in django 
Python :: how to change turtle shape in python 
Python :: new env in conda 
Python :: python bool to string 
Python :: pickling and unpickling in python 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =