ralate2 commited on
Commit
54b7778
·
verified ·
1 Parent(s): b2d3c9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -56,9 +56,9 @@ If I had more time, I might add interactivity to allow users to filter by other
56
  # Visualization 2: Line chart showing licenses issued over time
57
  st.subheader("Licenses Over Time")
58
 
59
- # Ensure the '_id' column exists; otherwise, use another unique identifier if available
60
- if '_id' in df.columns:
61
- time_data = df.groupby('Original Issue Year')['_id'].count().reset_index()
62
  else:
63
  time_data = df.groupby('Original Issue Year').size().reset_index(name='License Count')
64
 
 
56
  # Visualization 2: Line chart showing licenses issued over time
57
  st.subheader("Licenses Over Time")
58
 
59
+ # Ensure there is no missing data for 'Original Issue Year'
60
+ if df['Original Issue Year'].isnull().sum() == 0:
61
+ time_data = df.groupby('Original Issue Year').size().reset_index(name='License Count')
62
  else:
63
  time_data = df.groupby('Original Issue Year').size().reset_index(name='License Count')
64