-
Notifications
You must be signed in to change notification settings - Fork 0
/
Address.py
60 lines (47 loc) · 1.92 KB
/
Address.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import streamlit as st
import pandas as pd
st.title("Address Details Data Analysis")
@st.cache
def load_data():
data = pd.read_csv("address (1).csv")
return data
df = load_data()
st.write("Shape of the dataset:", df.shape)
st.write("Dataset head:", df.head())
if st.checkbox("Show summary statistics"):
st.write(df.describe())
if st.checkbox("Show missing values count"):
st.write(df.isnull().sum())
if st.checkbox("Show value count by country"):
country_value_counts = df['country'].value_counts()
st.bar_chart(country_value_counts)
if st.checkbox("Show value count by state"):
state_value_counts = df['state'].value_counts()
st.bar_chart(state_value_counts)
if st.checkbox("Show value count by taluka"):
city_value_counts = df['taluka'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by district"):
city_value_counts = df['district'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by division"):
city_value_counts = df['division'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by landmark"):
city_value_counts = df['landmark'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by street"):
city_value_counts = df['street_name'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by locality"):
city_value_counts = df['locality'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by building name"):
city_value_counts = df['building name'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by village"):
city_value_counts = df['village'].value_counts()
st.bar_chart(city_value_counts)
if st.checkbox("Show value count by postal code"):
postal_code_value_counts = df['pincode'].value_counts()
st.bar_chart(postal_code_value_counts)