Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

read_csv only certain columns

col_list = ["Name", "Department"]
df = pd.read_csv("sample_file.csv", usecols=col_list)
Comment

only read some columns from csv

df_spec = pd.read_csv("/content/churn.csv", usecols=['Gender', 'Age', 'Tenure', 'Balance'])
Comment

PREVIOUS NEXT
Code Example
Python :: python random number between 1 and 100 
Python :: python typing as int or float 
Python :: python time.strptime milliseconds 
Python :: Presskeys in python 
Python :: remove extension from filename python 
Python :: convert column string to int pandas 
Python :: python delete none from list 
Python :: read google sheet from web to pandas python 
Python :: install pytorch 
Python :: copy image from one folder to another in python 
Python :: degree symbol in python 
Python :: reverse row order pandas 
Python :: python selenium hover over element 
Python :: convert pdf to docx python 
Python :: pandas filter string contain 
Python :: python get time of day 
Python :: install pipenv on windows 
Python :: save and load catboost model 
Python :: input spaces seperated integers in python 
Python :: cv2.imwrite save to folder 
Python :: python remove cached package 
Python :: Python - How to check if string is a HEX Color Code 
Python :: pygame draw line 
Python :: write multiple df to excel pandas 
Python :: user agent for python 
Python :: panda select rows where column value inferior to 
Python :: pyyaml install 
Python :: remove unicode characters from string python 
Python :: how to move a button lower on a gui tkinter 
Python :: check python version ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =