Kaggle dataset connector for Streamlit
Project description
Custom component that allows to import Kaggle datasets to Streamlit apps.
Kaggle is the world's largest data science community. It enables users to explore and analyze a wide variety of public datasets.
This app demonstrates a simple KaggleDatasetConnection
which was built by extending the
built-in BaseConnection
You can view the connection source code
here.
While Kaggle offers datasets in different formats, this connector ONLY supports CSV files.
A user can connect to a Kaggle dataset by providing the dataset path and filename.
The path is the part of the dataset URL after the domain name, the structure is following: username/dataset-name.
For example, for the dataset https://www.kaggle.com/shivamb/netflix-shows, the path is shivamb/netflix-shows
,
and the file name is netflix_titles.csv
.
Using this example, the code to connect to the dataset would look like this:
from connection import KaggleDatasetConnection
import streamlit as st
conn = st.connection("kaggle_datasets", type=KaggleDatasetConnection)
df = conn.get(path='shivamb/netflix-shows', filename='netflix_titles.csv', ttl=3600)
KaggleDatasetConnection` class assumes that you have secrets set up in the following format:
[connections.kaggle_datasets]
KAGGLE_USERNAME = "insert your Kaggle username"
KAGGLE_KEY = "insert your Kaggle API key"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for st_kaggle_connector-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b13b02781e699549fb811ad1924dbb5561928b639aa2945f439fd697daa3a382 |
|
MD5 | 51501801bd36a627209ce056a4d57ecf |
|
BLAKE2b-256 | a6b9902664939f21b376d3a4731cb62c39f7874b78d3587f4174f63f99005ccd |
Hashes for st_kaggle_connector-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96dfa83534a69d58636e0c6f39ecd0a535c306f849bb1b711f43e4cc2205ee6c |
|
MD5 | 43467fcbae27db8c48a964fee33ee020 |
|
BLAKE2b-256 | 0fe030097caad049277c1b8274e22580a6ab2b838b7f800b69f1a0066b52f2a9 |