TANKERS | JUEGO [C][SDL] - | Media library
kandi X-RAY | TANKERS Summary
kandi X-RAY | TANKERS Summary
TANKERS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TANKERS
TANKERS Key Features
TANKERS Examples and Code Snippets
Community Discussions
Trending Discussions on TANKERS
QUESTION
I ultimately would like to write a table based on "groupby" of a DataFrame to a pdf file.
In order to do so, creating a "plot" of the table seems to be a way to achieve it.
I use the code below. The table is shown nicely using print()
, but generates the error when trying to plot the table:
ANSWER
Answered 2021-Jan-10 at 10:30You can use reset_index()
. Your groupby aggregation with .sum()
returns a pandas series, while the plotting function expects a dataframe (or similar 2D string structure). When printing, a Multiindex dataframe looks similar to a series, so it is easy to assume, you generated a new dataframe for the plot. However, you might have noticed that the printout of your aggregation series does not have a column name, the name Holding
is instead printed below.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TANKERS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page