Commit 08e998a3 authored by Sina's avatar Sina
Browse files

pieChartAdded

parent 384ef3fc
%% Cell type:code id:790abd3e tags:
``` python
import pandas as pd
```
%% Cell type:code id:1c15fe13 tags:
``` python
df_train = pd.read_csv('./train.csv')
df_test = pd.read_csv('./test.csv')
df_train.sample(5)
```
%% Output
id keyword location \
2333 3357 demolition Lisbon, Portugal
1491 2149 catastrophe Portugal
5318 7593 outbreak New York, NY
2252 3225 deluged Clearwater, FL
6653 9533 terrorist ????? ???? ????
text target
2333 Draw Day Demolition Daily football selection s... 0
1491 Alaska's #Wolves face catastrophe Denali Wolve... 0
5318 An outbreak of Legionnaires' disease in New Yo... 1
2252 @LisaToddSutton The reason I bring this up bc... 0
6653 #UdhampurAgain 2 terrorist shot dead.. #Udhampur 1
%% Cell type:code id:582b9cb8 tags:
``` python
import matplotlib.pyplot as plt
target_count = df_train.target.value_counts()
plt.figure(figsize=(8,4))
plt.bar(['not a disaster','disaster'], target_count.values)
plt.title("Real disaster or not distribution")
```
%% Output
Text(0.5, 1.0, 'Real disaster or not distribution')
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment