achmaddhani commited on
Commit
b0125cf
·
1 Parent(s): 457551e

Update eda.py

Browse files
Files changed (1) hide show
  1. eda.py +5 -0
eda.py CHANGED
@@ -12,6 +12,11 @@ def run():
12
  # ============================= Simple Analysis ========================
13
 
14
  eda=pd.read_csv('eda.csv')
 
 
 
 
 
15
  # emotion distribution
16
  fig_emotions = px.bar(emotion_counts,
17
  x=emotion_counts.index,
 
12
  # ============================= Simple Analysis ========================
13
 
14
  eda=pd.read_csv('eda.csv')
15
+ # basic summary analysis
16
+ emotion_counts = eda['Emotion'].value_counts()
17
+
18
+ eda['Comment Length'] = eda['Comment'].apply(len)
19
+ eda['Word Count'] = eda['Comment'].apply(lambda x: len(x.split()))
20
  # emotion distribution
21
  fig_emotions = px.bar(emotion_counts,
22
  x=emotion_counts.index,