Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create horizontal descriptives table pandas

df = pd.DataFrame({'A':[0, 2, 2, 4, 9, 10, 15, 8, 7, 4],
				   'B':['One', 'One', 'Two', 'Two', 'One', 'One', 'One', 'Two', 'Two', 'One]})


# Gets descriptive data for a column, but transposes to horizontal orientation
df['A'].describe().reset_index().transpose()

# Does the same as above, but breaks out by group
df.groupby('B')['A'].describe()
Comment

PREVIOUS NEXT
Code Example
Python :: Delete files in folder by extension 
Python :: How to assign a value to a dictionary if I need to reference it in the right hand side? 
Python :: how to increase width of line in graph of linear regression in matplotlib 
Python :: replace python enter number of characters 
Python :: Creaing your own functions 
Python :: how to usepygame.sprite.spritecollide 
Python :: visualizing of convolutional kernels using pytorch 
Python :: data[:,:2] 
Python :: get_string python 
Python :: pydrive download file 
Python :: file attributes in os 
Python :: viola conda 
Python :: python time modülü 
Python :: houghlinesp python stackoverflow 
Python :: k means image classification 
Python :: install eric6 python ide ubuntu 20.04 
Python :: raspberry pi run a python script using ssh 
Python :: django clodinarystorage 
Python :: ModelCheckpoint 
Python :: python3 array 
Python :: Compute the variance of this RDD’s elements 
Python :: Limits the result count to the number specified 
Python :: getting vocab from a text file python 
Python :: mask and then fillnan# 
Python :: idwt pywt 
Python :: python set class variable 
Python :: how to get list from comma separated string in python 
Python :: multiplication table with three lines of code in python 
Python :: documentation on fasttext gensim python 
Python :: stitch two dictionary python 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =