Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,5 +35,19 @@ st.table(language_counts_df)
|
|
35 |
# Display the plot in the Streamlit app
|
36 |
st.pyplot(fig)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
st.dataframe(df)
|
39 |
|
|
|
|
|
|
35 |
# Display the plot in the Streamlit app
|
36 |
st.pyplot(fig)
|
37 |
|
38 |
+
|
39 |
+
# Extract user_id from the is_edit_required field in the response column and count occurrences
|
40 |
+
user_ids = df['response'].apply(lambda x: x['is_edit_required']).explode().apply(lambda x: x['user_id'])
|
41 |
+
user_id_counts = user_ids.value_counts()
|
42 |
+
|
43 |
+
# Convert the user ID counts to a DataFrame for display in the table
|
44 |
+
user_id_counts_df = user_id_counts.reset_index()
|
45 |
+
user_id_counts_df.columns = ['User ID', 'Count']
|
46 |
+
|
47 |
+
# Display the table of user ID counts in the Streamlit app
|
48 |
+
st.table(user_id_counts_df)
|
49 |
+
|
50 |
st.dataframe(df)
|
51 |
|
52 |
+
|
53 |
+
|