Workspace
Eduardo Rubio Herrera/

Analyzing unicorn company data

0
Beta
Spinner
Unknown integration
DataFrameavailable as
df
variable
select * from public.companies
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
import matplotlib.pyplot as plt

# Group the data by continent and count the number of companies in each continent
continent_counts = df.groupby("continent")["company_id"].count()

# Create a bar chart to visualize the data
plt.bar(continent_counts.index, continent_counts.values)
plt.xlabel("Continent")
plt.ylabel("Number of Companies")
plt.title("Number of Companies by Continent")

# Display the chart
plt.show()
Open the video in a new tab
  • AI Chat
  • Code