Spaces:
Runtime error
Runtime error
ryanrahmadifa
commited on
Commit
·
24f5b17
1
Parent(s):
5a057ad
Added more features.
Browse files
app.py
CHANGED
@@ -28,12 +28,14 @@ df_mean = pd.DataFrame({
|
|
28 |
'topic_verification' : ['']
|
29 |
})
|
30 |
|
31 |
-
df_news_final = pd.concat([df_news, df_mean])
|
32 |
|
33 |
df_news_final.index = np.arange(1, len(df_news_final) + 1)
|
34 |
|
35 |
df_news_final
|
36 |
|
|
|
|
|
37 |
try:
|
38 |
st.plotly_chart(plot_3dgraph(df_news_final), use_container_width=True)
|
39 |
except:
|
|
|
28 |
'topic_verification' : ['']
|
29 |
})
|
30 |
|
31 |
+
df_news_final = pd.concat([df_news, df_mean])
|
32 |
|
33 |
df_news_final.index = np.arange(1, len(df_news_final) + 1)
|
34 |
|
35 |
df_news_final
|
36 |
|
37 |
+
st.markdown('---')
|
38 |
+
|
39 |
try:
|
40 |
st.plotly_chart(plot_3dgraph(df_news_final), use_container_width=True)
|
41 |
except:
|
modules/__pycache__/data_preparation.cpython-39.pyc
CHANGED
Binary files a/modules/__pycache__/data_preparation.cpython-39.pyc and b/modules/__pycache__/data_preparation.cpython-39.pyc differ
|
|
modules/data_preparation.py
CHANGED
@@ -27,6 +27,12 @@ def prepare_df(df, categories):
|
|
27 |
|
28 |
filter = news_data['headline'].str.contains(pattern_del)
|
29 |
news_data = news_data[~filter]
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
except Exception as E:
|
32 |
print(E)
|
|
|
27 |
|
28 |
filter = news_data['headline'].str.contains(pattern_del)
|
29 |
news_data = news_data[~filter]
|
30 |
+
|
31 |
+
# shift column 'C' to first position
|
32 |
+
first_column = news_data.pop('headline')
|
33 |
+
|
34 |
+
# insert column using insert(position,column_name,first_column) function
|
35 |
+
news_data.insert(0, 'headline', first_column)
|
36 |
|
37 |
except Exception as E:
|
38 |
print(E)
|