|
12 | 12 | type=int, |
13 | 13 | help="""The maximum number of consecutive records to interpolate. See the documentation of the |
14 | 14 | pandas.DataFrame.interpolate() method's "limit" argument for more details. Basically, |
15 | | - if a sequence of fields up to the length defined by this argument are missing, those |
16 | | - missing values will be interpolated linearly using the values of the fields immediately |
| 15 | + if a sequence of fields up to the length defined by this argument are missing, those |
| 16 | + missing values will be interpolated linearly using the values of the fields immediately |
17 | 17 | preceding and following the missing field(s). If a sequence of fields is longer than this |
18 | 18 | limit, then those fields' values will be imputed instead (see --max-records-to-impute) |
19 | 19 | """ |
|
24 | 24 | show_default=True, |
25 | 25 | type=int, |
26 | 26 | help=f"""The maximum number of records to impute. For groups of missing records larger than the |
27 | | - limit set by --max-records-to-interpolate but up to --max-records-to-impute, we replace the |
28 | | - missing values using the average of the value two weeks prior and the value two weeks after |
29 | | - the missing value. If there are more consecutive missing records than this limit, then the |
| 27 | + limit set by --max-records-to-interpolate but up to --max-records-to-impute, we replace the |
| 28 | + missing values using the average of the value two weeks prior and the value two weeks after |
| 29 | + the missing value. If there are more consecutive missing records than this limit, then the |
30 | 30 | file will not be processed, and will be added to the error file.""" |
31 | 31 | ) |
32 | 32 | @click.option( |
@@ -109,7 +109,7 @@ def create_amy_epw_files( |
109 | 109 |
|
110 | 110 | click.echo(f"Success! {os.path.basename(amy_file_path)} => {os.path.basename(amy_epw_file_path)} ({idx} / {num_files})") |
111 | 111 | except Exception as e: |
112 | | - errors = errors.append({"file": amy_file_path, "error": str(e)}, ignore_index=True) |
| 112 | + errors = pd.concat([errors, pd.DataFrame({"file": amy_file_path, "error": str(e)})], ignore_index=True) |
113 | 113 | click.echo(f"\n*** Error! {amy_file_path} could not be processed, see {errors_path} for details ({idx} / {num_files})\n") |
114 | 114 |
|
115 | 115 | click.echo("\nDone!") |
|
0 commit comments