Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plot the distribution of value_counts() python

# data -> your dataframe
# only shows the first 20 most recurring values
plt.title("title", x=0.9, y=0.9)
data['column_name'].value_counts()[:20].plot(kind='barh')
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: sns.savefig 
Python :: selenium select svg python3 
Python :: python class with optional arguments 
Python :: covert docx to pdf with libraoffice in python 
Python :: extra import on django 
Python :: random number list 
Python :: compare string python 
Python :: tuple methods in python 
Python :: calculate the surface area of a cylinder python 
Python :: numpy sum 
Python :: pandas data frame from part of excel 
Python :: remove days when subtracting time python 
Python :: counting unique values python 
Python :: get all ForeignKey data by nesting in django 
Python :: set lable of field django 
Python :: check if value is in list python 
Python :: executing a python script interactively 
Python :: Using Python Permutations to Find the order in lexicographical sorted order 
Python :: iterate over rows in numpy matrix python 
Python :: input check in pygame 
Python :: pandas series to dataframe index as column 
Python :: minio python create bucket 
Python :: python open file check error 
Python :: Passing Arrays to Methods 
Python :: how to sum numpy matrix diagonal 
Python :: how to omit days pandas datetime 
Python :: how to take first half of list python 
Python :: relu python 
Python :: pandas split cell into multiple columns 
Python :: first step creating python project 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =