-
Notifications
You must be signed in to change notification settings - Fork 0
/
streamlit_app.py
37 lines (28 loc) · 893 Bytes
/
streamlit_app.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
import streamlit as st
import pandas as pd
from sklearn.datasets import load_iris
from sklearn.datasets import load_wine
import matplotlib.pyplot as plt
import numpy as np
# data = load_iris(as_frame=True)
data = load_wine(as_frame=True)
df =data.frame
st.write("Here's our first attempt at using data to create a table:")
st.write(pd.DataFrame({
'first column': [1, 2, 3, 4],
'second column': [10, 20, 30, 40]
}))
st.write("Here is the wine dataframe")
st.dataframe(df)
st.write("Another change")
st.write("Let's see the description")
st.write(df.describe())
st.write("A graph")
plt.figure(figsize=(10, 6))
# Graficar los valores de la columna 'alcohol'
plt.plot(df.index, df['alcohol'], marker='o', linestyle='-', color='b')
# Añadir etiquetas y título
plt.xlabel('Índice')
plt.ylabel('Alcohol')
plt.title('Valores de Alcohol en el Dataset de Vino')
st.pyplot(plt)