import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
## the following is the data set
gm = pd.read_csv('https://raw.githubusercontent.com/gerberl/6G7V0026-2223/main/datasets/gapminder.tsv', sep='\t')
the command that I have been using, which counts each country multiple times.
sns.countplot(x=gm.continent)
plt.show
I can get the plot graph by making a new data frame, however there must be a way to get the graph without making a new dataframe.
The bars would be for the total number of countries in each continent, where the x-axis will be continents.
CodePudding user response: