update readme

develop
gwen 3 years ago
parent 1fa54c163a
commit 97fe81cd5d

@ -19,12 +19,14 @@ A best-practice setup includes initialising git and creating a virtual environme
- install kedro `pip install kedro` - install kedro `pip install kedro`
- Install the packages and libraries `pip install -r src/requirements.txt` - Install the packages and libraries `pip install -r src/requirements.txt`
Then open a terminal in the `actes-princiers` folder Then open a terminal in the `actes-princiers`'s folder
and launch jupyter : `kedro jupyter notebook` and launch jupyter : `kedro jupyter notebook`
or start the ipython prompt : `kedro ipython` or start the ipython prompt : `kedro ipython`
## Launching the pipeline ## Launching the pipeline
Open a terminal in the `actes-princiers`'s folder and launch kedro
`kedro run` `kedro run`
## Visualizing the pipelines ## Visualizing the pipelines

@ -1,16 +1,17 @@
import pandas as pd import pandas as pd
import numpy as np import numpy as np
def _is_true(x: pd.Series) -> pd.Series: #def _is_true(x: pd.Series) -> pd.Series:
return x == "t" # return x == "t"
def _parse_percentage(x: pd.Series) -> pd.Series: #def _parse_percentage(x: pd.Series) -> pd.Series:
x = x.str.replace("%", "") # x = x.str.replace("%", "")
x = x.astype(float) / 100 # x = x.astype(float) / 100
return x # return x
def preprocess_actors(actors: pd.DataFrame) -> pd.DataFrame: def preprocess_actors(actors: pd.DataFrame) -> pd.DataFrame:
actors.replace("XXXX", np.NaN) actors.replace("XXXX", np.NaN)
return actors return actors
#def parse_xsl(

@ -12,5 +12,11 @@ def create_pipeline(**kwargs) -> Pipeline:
outputs="preprocessed_actors", outputs="preprocessed_actors",
name="preprocess_actors_node", name="preprocess_actors_node",
), ),
# node(
# func=parse_xsl,
# inputs="actors",
# outputs="preprocessed_actors",
# name="preprocess_actors_node",
# ),
] ]
) )

Loading…
Cancel
Save