-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
24 lines (23 loc) · 852 Bytes
/
Copy pathtest.py
File metadata and controls
24 lines (23 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import pandas as pd
import altair as alt
import numpy as np
data = pd.read_csv('csv/school.csv')
def test():
st.text(data.dtypes)
for cols in data.columns:
if data[cols].dtype == 'float64' or data[cols].dtype=='int64':
for cols2 in data.columns:
if data[cols2].dtype == 'float64' and cols!=cols2:
chart_data = data[[cols,cols2,'State']]
c = (
alt.Chart(chart_data)
.mark_circle()
.encode(
x=cols,
y=cols2,
tooltip=[cols, cols2],
color='State',
)
)
st.altair_chart(c, use_container_width=True)