Snedecor
Snedecor

Reputation: 739

Pandas DataFrame with Bars

I have a pandas DataFrame. Is there any way to add those bars on the dataFrame?

enter image description here

For example if the code would be like this:

import pandas as pd
df = pd.DataFrame([[1, 3], [3, 7], [4, 1]], columns = [A, B])

Upvotes: 0

Views: 38

Answers (1)

yatu
yatu

Reputation: 88236

No you cannot do that, as a pandas dataframe is a data structure, thus it has to be constituted or built by numpy arrays, a dict, or DataFrame. What you can do is generate a bar plot and add text to it from the dataframe values.

Upvotes: 1

Related Questions