[PYTHON] [In one line] Visualize like a lawn with just Pandas

What is a lawn

It is a heat map showing the activity level of events in one year. This article explains in an easy-to-understand manner.

manner

# `s`Is a series of suitable date type
pd.crosstab(s.dt.day_name().rename('day_of_week'), s.dt.week.rename('week')).loc[['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']].style.background_gradient(axis=None, cmap='YlGn'))

image.png

Recommended Posts

[In one line] Visualize like a lawn with just Pandas
Make a rock-paper-scissors game in one line (python)
Quickly visualize with Pandas
How to do zero-padding in one line with OpenCV
Visualize railway line data as a graph with Cytoscape 2
Output a character string with line breaks in PyYAML
[Django] Manage settings like writing in settings.py with a model
Fizzbuzz in Python (in one line)
Visualize event congestion in public space with a laser rangefinder
Ingenuity to handle data with Pandas in a memory-saving manner
[Python] Plotly draws Pandas dataframes in one shot with Cufflinks
Until I return something with a line bot in Django!
I made a puzzle game (like) with Tkinter in Python
Prime number enumeration in one line
Draw a graph with pandas + XlsxWriter
Ignore # line and read in pandas
Create a LINE Bot in Django
I made a mistake in fetching the hierarchy with MultiIndex of pandas
Spiral book in Python! Python with a spiral book! (Chapter 14 ~)
CGI server (1) python edition in one line
Load csv with duplicate columns in pandas
Play like a web app with ipywidgets
Draw a heart in Ruby with PyCall
Quickly try to visualize datasets with pandas
One liner webServer (with CGI) in python
Decompose command arguments in one line in Python
[Python] Invert bool value in one line
Working with 3D data structures in pandas
If you can't type a line break "\" in GoLand downloaded with macOS JetBrains
Invert pandas DataFrame upside down with just 15 characters without using a for statement
How to drop Google Docs in one folder in a .txt file with python
How to speed up Pandas apply method with just one sentence (with verification calculation)