Last active
November 5, 2021 20:25
-
-
Save khuyentran1401/155b22d34d159d960e61b28ecdfcd396 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 prefect import task | |
from typing import Any, Dict, List | |
import pandas as pd | |
@task | |
def load_data(path: str) -> pd.DataFrame: | |
... | |
@task | |
def get_classes(data: pd.DataFrame, target_col: str) -> List[str]: | |
"""Task for getting the classes from the Iris data set.""" | |
... | |
@task | |
def encode_categorical_columns(data: pd.DataFrame, target_col: str) -> pd.DataFrame: | |
"""Task for encoding the categorical columns in the Iris data set.""" | |
... | |
@task | |
def split_data(data: pd.DataFrame, test_data_ratio: float, classes: list) -> Dict[str, Any]: | |
"""Task for splitting the classical Iris data set into training and test | |
sets, each split into features and labels. | |
""" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment