Arts-of-coding commited on
Commit
06c672d
1 Parent(s): 1cfc9ec

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +11 -21
main.py CHANGED
@@ -37,31 +37,21 @@ storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STO
37
 
38
  df = pl.read_parquet(filepath,storage_options=storage_options)
39
 
40
- #pq.write_table(polars_dataframe.to_arrow(), 'liu/file_name.parquet', filesystem=abfs)
41
- #storage_options = {
42
- # "aws_access_key_id": ,
43
- # "aws_secret_access_key": os.environ['AZURE_STORAGE_ACCESS_KEY'],
44
- #}
45
- #df = pl.scan_parquet(source, storage_options=storage_options)
46
-
47
-
48
- #config_path = "./azure/data/config.yaml"
49
 
50
  # Add the read-in data from the yaml file
51
- #def read_config(filename):
52
- # with open(filename, 'r') as yaml_file:
53
- # config = yaml.safe_load(yaml_file)
54
- # return config
55
 
56
- #config = read_config(config_path)
57
  #path_parquet = config.get("path_parquet")
58
- #conditions = config.get("conditions")
59
- #col_features = config.get("col_features")
60
- #col_counts = config.get("col_counts")
61
- #col_mt = config.get("col_mt")
62
-
63
- # Import the data from one .parquet file
64
- #df = pl.read_parquet(path_parquet)
65
  #df = df.rename({"__index_level_0__": "Unnamed: 0"})
66
 
67
  # Setup the app
 
37
 
38
  df = pl.read_parquet(filepath,storage_options=storage_options)
39
 
40
+ # Load in config file
41
+ config_path = "./data/config.yaml"
 
 
 
 
 
 
 
42
 
43
  # Add the read-in data from the yaml file
44
+ def read_config(filename):
45
+ with open(filename, 'r') as yaml_file:
46
+ config = yaml.safe_load(yaml_file)
47
+ return config
48
 
49
+ config = read_config(config_path)
50
  #path_parquet = config.get("path_parquet")
51
+ conditions = config.get("conditions")
52
+ col_features = config.get("col_features")
53
+ col_counts = config.get("col_counts")
54
+ col_mt = config.get("col_mt")
 
 
 
55
  #df = df.rename({"__index_level_0__": "Unnamed: 0"})
56
 
57
  # Setup the app