-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.py
More file actions
54 lines (34 loc) · 775 Bytes
/
sample.py
File metadata and controls
54 lines (34 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# region Imports
import numpy as np
import pandas as pd
from typing import List, Dict
# endregion
# region Data Processing
# region Loading
def load_data(path: str) -> pd.DataFrame:
return pd.read_csv(path)
# endregion
# region Cleaning
def clean_data(df: pd.DataFrame) -> pd.DataFrame:
return df.dropna()
# endregion
# endregion
# region Visualization
def plot_results(data: Dict):
import matplotlib.pyplot as plt
plt.plot(data["x"], data["y"])
plt.show()
# endregion
# region Main
def main():
# region Setup
config = {"path": "data.csv"}
# endregion
# region Execution
df = load_data(config["path"])
df = clean_data(df)
# endregion
print("Done!")
if __name__ == "__main__":
main()
# endregion