Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

showing specific columns pandas

df[['COL 1', 'COL 2']]
Comment

load specific columns dataframe

import pandas as pd
fields = ['star_name', 'ra']

df = pd.read_csv('data.csv', usecols=fields)
Comment

PREVIOUS NEXT
Code Example
Python :: dictionary to list python 
Python :: how to add two list by zip function in python 
Python :: breadth first search python 
Python :: find sum of factors of a number python 
Python :: python json check if key exists 
Python :: execute terminal command from python 
Python :: Auto-removal of grids by pcolor() and pcolormesh() is deprecated since 3.5 and will be removed two minor releases later; please call grid(False) first. 
Python :: python generator 
Python :: how to get int input in python 
Python :: google translator api pyhton 
Python :: python submit work to redis 
Python :: beautifulsoup find get value 
Python :: dropna threshold 
Python :: displaying cv2.imshow on specific window position 
Python :: UTC to ISO 8601 with TimeZone information (Python 3): 
Python :: get_dummies 
Python :: numpy array split 
Python :: voice translate python 
Python :: redirect a post request django 
Python :: python sort dictionary by value 
Python :: Calculate Euclidean Distance in Python using norm() 
Python :: python is inf 
Python :: python print value and variable name 
Python :: check if argv exists python 
Python :: print first word of a string python and return it 
Python :: ImportError: DLL load failed while importing win32file: The specified module could not be found. 
Python :: pandas data frame to list 
Python :: digit sum codechef 
Python :: pandas groupby counts 
Python :: pandas reset index 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =