Skip to content

Instantly share code, notes, and snippets.

@gireeshkbogu
Last active June 12, 2021 21:37
Show Gist options
  • Save gireeshkbogu/f92155a71027b99716f0f8667af5d476 to your computer and use it in GitHub Desktop.
Save gireeshkbogu/f92155a71027b99716f0f8667af5d476 to your computer and use it in GitHub Desktop.
# With this you cann upload a CSV file and plot a scatterplot.
import pandas as pd
import streamlit as st
import seaborn as sns
import matplotlib.pyplot as plt
st.set_option('deprecation.showPyplotGlobalUse', False)
st.title("Basic plotting..")
uploaded_file = st.sidebar.file_uploader("Choose a file")
if uploaded_file is not None:
df = pd.read_csv(uploaded_file)
df
sns.scatterplot(data=df, x="sepal_length", y="sepal_width", hue="species")
st.pyplot()
@gireeshkbogu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment