pandas.plotting.table
pandas 3.1.1 · Plotting · function
Add a table of pandas values to a Matplotlib axes.
Call syntax
pd.plotting.table(ax, data, **kwargs)Inspect the call
Run this code to inspect the callable and its parameters. Its data, backend, or environment is needed to execute the operation itself.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
ax |
Required Positional or keyword |
Matplotlib axes object Provide the existing Matplotlib axes on which to draw. |
data |
Required Positional or keyword |
DataFrame or Series Provide the input data read, transformed, or stored by this call. |
**kwargs |
Optional Additional keyword arguments |
Returns
matplotlib table object
Example for a local Python session
import pandas as pd
import matplotlib.pyplot as plt
frame = pd.DataFrame({"units": [2., 5., 7.], "price": [4., 3., 2.]})
print(pd.plotting.table(plt.subplots()[1], frame))