Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Ordering column names sensibly in pandas

# read column by indexing
# classify each column as either discrete or continuous
cols = pd.read_csv('name.csv').columns 
read_col_indexing = pd.read_csv('name.csv',usecols=cols[:5])
read_col_indexing.head()
Comment

PREVIOUS NEXT
Code Example
Python :: treat NaN as a category 
Python :: python3 netifaces get current interface 
Python :: how to convert string labels to numpy array 
Python :: python dijkstra implementation stack 
Python :: ---Input Chevy Times--- 
Python :: combining sparse class 
Python :: def square_odd(pylist) 
Python :: gdal user with anaconda 
Python :: matplotlib plt.sapect 
Python :: prefetched_related django rest framework 
Python :: what does eval function do in python stack overflow 
Python :: extends template django file system 
Python :: aiml python install 
Python :: fibonci in python 
Python :: Can I convert python code to C++? 
Python :: add vertical line to horizontal graph 
Python :: Python regex emailadres no jpg 
Python :: filtrar en python/how to filter in python 
Python :: hypercorn initiate 
Python :: vs python 
Python :: sklearn model persistence 
Python :: download python for windows 7 32-bit 
Python :: java scirpt 
Python :: filter all columns in pandas 
Python :: # sort the dictionary 
Python :: overlay bar plot and line plot in python 
Python :: how-to-add-new-column-to-an-dataframe-to-the-front-not-end 
Python :: Command to import the Schema interface from voluptuous 
Python :: split x and y pandas 
Python :: codeforces 1133A in python 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =