Skip to content

Commit 9a651f7

Browse files
committed
update more appends
1 parent b3bc68d commit 9a651f7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

diyepw/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.2.4'
1+
__version__ = '1.3.1'
22
from .meteorology import Meteorology
33
from .create_amy_epw_files_for_years_and_wmos import create_amy_epw_files_for_years_and_wmos
44
from .analyze_noaa_isd_lite_files import analyze_noaa_isd_lite_files

diyepw/create_amy_epw_files_for_years_and_wmos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def create_amy_epw_files_for_years_and_wmos(
9191
)
9292
amy_epw_files[year][wmo_index].append(amy_epw_file)
9393
except Exception as e:
94-
errors = errors.append({"year": year, "wmo_index": wmo_index, "error": str(e)}, ignore_index=True)
94+
errors = pd.concat([errors, pd.DataFrame({"year": year, "wmo_index": wmo_index, "error": str(e)})], ignore_index=True)
9595
print(f'Problem processing year {year} and WMO index {wmo_index}: ' + str(e))
9696

9797
if not errors.empty:

diyepw/scripts/create_amy_epw_files.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
type=int,
1313
help="""The maximum number of consecutive records to interpolate. See the documentation of the
1414
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
1717
preceding and following the missing field(s). If a sequence of fields is longer than this
1818
limit, then those fields' values will be imputed instead (see --max-records-to-impute)
1919
"""
@@ -24,9 +24,9 @@
2424
show_default=True,
2525
type=int,
2626
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
3030
file will not be processed, and will be added to the error file."""
3131
)
3232
@click.option(
@@ -109,7 +109,7 @@ def create_amy_epw_files(
109109

110110
click.echo(f"Success! {os.path.basename(amy_file_path)} => {os.path.basename(amy_epw_file_path)} ({idx} / {num_files})")
111111
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)
113113
click.echo(f"\n*** Error! {amy_file_path} could not be processed, see {errors_path} for details ({idx} / {num_files})\n")
114114

115115
click.echo("\nDone!")

0 commit comments

Comments
 (0)