text_html_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import plotly.express as px

ci = pd.read_csv('../input/farmers-markets-in-the-united-states/wiki_county_info.csv')
fm = pd.read_csv('../input/farmers-markets-in-the-united-states/farmers_markets_from_usda.csv')

import plotly.express as px
state_farms = pd.DataFrame(fm['State'].value_counts())
state_farms.rename(columns={'State': 'Number of farmers markets'}, inplace=True)
fig = px.bar(state_farms, x=state_farms.index, y='Number of farmers markets', color='Number of farmers markets', color_continuous_scale='Blues', title='Number of Farmers Markets by State')
fig.update_layout(xaxis_title='State', yaxis_title='Number of Farmers Markets', plot_bgcolor='white', showlegend=False)
fig.show()