Last active
January 16, 2022 15:56
-
-
Save adiamaan92/541f344f0b112c3ace68d676a41682ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kaggle.api.kaggle_api_extended import KaggleApi | |
def get_speeches(api: KaggleApi) -> str: | |
"""Get latest speech from kaggle dataset | |
Args: | |
api (KaggleApi): Kaggle api | |
Returns: | |
Latest speech title from previous run | |
""" | |
api.dataset_download_files("adiamaan/modi-speeches", path="./data", unzip=True) | |
df = pd.read_csv("./data/modi_speeches.csv") | |
return df.loc[:, "title"].values[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment