Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to get only certain columns in pandas

#only the column names specified will be put into the new sub df
#enter a minimum of one column name
print(df[['column_name_1', 'column_name_2', ... , 'column_name_n']])
Comment

get particular columns from dataframe

x, y = df.iloc[:, [0]], df.iloc[:, [1]]
Comment

how to get only one column from dataset in python

df['name']
Comment

PREVIOUS NEXT
Code Example
Python :: python append to csv on new line 
Python :: get int64 column pandas 
Python :: free python script hosting 
Python :: glob list all files in directory 
Python :: python big comment 
Python :: send message if user is banned discord.py 
Python :: python fill string with 0 left 
Python :: how to set up dataframe from csv 
Python :: python remove nan rows 
Python :: python insert 
Python :: pandas str is in list 
Python :: python selenium web scraping example 
Python :: python use variable in another file 
Python :: try except python 
Python :: remove all instances from list python 
Python :: make binary tree in python 
Python :: random id python 
Python :: Simple way to measure cell execution time in ipython notebook 
Python :: for loop in django 
Python :: django urlpattern 
Python :: python 2 decimal places format 
Python :: pause python 
Python :: how to display address in python 
Python :: get pixel color pygame 
Python :: how to select python 3 interpreter in linux 
Python :: what is kali 
Python :: append a zeros column numpy 
Python :: how to play audio in python 
Python :: df reset index 
Python :: pylint import error 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =