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

Logical test in data.py crashing query #17

Open
chriscarrollsmith opened this issue Sep 26, 2024 · 0 comments
Open

Logical test in data.py crashing query #17

chriscarrollsmith opened this issue Sep 26, 2024 · 0 comments

Comments

@chriscarrollsmith
Copy link
Owner

params = {}
params['IFS'] = imfp.imf_parameters("IFS")

dataset = imfp.imf_dataset(
  database_id="IFS",
  freq=params.get('IFS').get('freq'),
  ref_area=params.get('IFS').get('ref_area'),
  indicator=params.get('IFS').get('indicator')
)

ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_25408\3165042163.py in ?()
1 # Get the dataset for "IFS, Annual, US" and display it in a web browser
2 view = "IFS, Annual, US"
3
4
----> 5 dataset = imfp.imf_dataset(
6 database_id="IFS",
7 freq=params.get('IFS').get('freq'),
8 ref_area=params.get('IFS').get('ref_area'),

c:\Users\chris.virtualenvs\datascience-test-cTLlEgea\Lib\site-packages\imfp\data.py in ?(database_id, parameters, start_year, end_year, return_raw, print_url, times, include_metadata, **kwargs)
310 invalid_vals = []
311 if not isinstance(kwargs[key], list):
312 kwargs[key] = [kwargs[key]]
313 for x in kwargs[key]:
--> 314 if x not in data_dimensions[key]["input_code"].tolist():
315 invalid_vals.append(x)
316 if len(invalid_vals) > 0:
317 warn(

c:\Users\chris.virtualenvs\datascience-test-cTLlEgea\Lib\site-packages\pandas\core\generic.py in ?(self)
1575 @Final
1576 def nonzero(self) -> NoReturn:
...
1578 f"The truth value of a {type(self).name} is ambiguous. "
1579 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
1580 )

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