Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
78 views
in Technique[技术] by (71.8m points)

python - Is there a specific chart that can be used to plot this type of data?

I have this data

Zip Codes  Year     Mean
2443       2016    92.869565
           2017    93.364486
           2018    93.070000
           2019    93.760000
2445       2016    94.848837
                     ...    
27326      2019    99.000000
27334      2016    94.250000
           2017    95.625000
           2018    96.812500
           2019    97.666667

i have the above dataframe from pandas, which has about 1000 zip codes for 4 different years for each zipcode and a mean value of the height of a specific plant.

What is the best possible way to represent this data ?

question from:https://stackoverflow.com/questions/65623610/is-there-a-specific-chart-that-can-be-used-to-plot-this-type-of-data

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use a heat map (seaborn.heatmap) with zip codes on rows, years on columns, and cell color by mean plant height.

SEE ALSO:
Plotting a 2D heatmap with Matplotlib
Making heatmap from pandas DataFrame
The Python Graph Gallery: Heatmap


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...