Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temp_min_col and temp_max_col should accept column names #1

Open
timcera opened this issue Mar 17, 2022 · 0 comments
Open

temp_min_col and temp_max_col should accept column names #1

timcera opened this issue Mar 17, 2022 · 0 comments

Comments

@timcera
Copy link
Owner

timcera commented Mar 17, 2022

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [36], in <cell line: 7>()
    153     bias = np.mean(temp_ts.Tmin - temp_ts_fill.Tmin)
    154     temp_ts["Tmin"].fillna(temp_ts_fill["Tmin"] + bias, inplace=True)
--> 156 temp_disaggregate = met.disaggregate.temperature(
    157     input_ts=temp_ts,
    158     temp_min_col="Tmin",
    159     temp_max_col="Tmax",
    160     method="sine_min_max",
    161     min_max_time="sun_loc",
    162     source_units=["degF", "degF"],
    163     lat=station["Latitude"],
    164     lon=station["Longitude"],
    165     target_units=["degF"],
    166 )
    167 missing_info.iloc[i, 4] = len(temp_ts["Tmax"][temp_ts["Tmax"].isna()])
    168 missing_info.iloc[i, 5] = len(temp_ts["Tmin"][temp_ts["Tmin"].isna()])

File /beohome/a/ScientificProgramSupport/local/pythons/python3.8.6/lib64/python3.8/site-packages/typic/api.py:189, in wrap.<locals>.func_wrapper(*args, **kwargs)
    186 @functools.wraps(func)
    187 def func_wrapper(*args, **kwargs):
    188     args, kwargs = enforcer(*args, **kwargs)
--> 189     return func(*args, **kwargs)

File /beohome/a/ScientificProgramSupport/local/pythons/python3.8.6/lib64/python3.8/site-packages/mettoolbox/disaggregate.py:135, in temperature(method, source_units, min_max_time, mod_nighttime, input_ts, start_date, end_date, dropna, clean, round_index, skiprows, index_type, names, print_input, target_units, max_delta, temp_min_col, temp_max_col, temp_mean_col, lat, lon, hourly)
    133 columns = []
    134 try:
--> 135     temp_min_col = int(temp_min_col)
    136 except TypeError:
    137     pass

ValueError: invalid literal for int() with base 10: 'Tmin'
sourcery-ai bot pushed a commit that referenced this issue Sep 8, 2022
Sync Forked Repo 2022/08/29
timcera added a commit that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant