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

pandas warnings #72

Closed
dstansby opened this issue Sep 29, 2022 · 2 comments · Fixed by #73 or #76
Closed

pandas warnings #72

dstansby opened this issue Sep 29, 2022 · 2 comments · Fixed by #73 or #76

Comments

@dstansby
Copy link
Member

Describe the bug

In sunpy we're getting a bunch of warnings that look like this, and are coming from drms:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/doctest.py", line 1334, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest jsoc.rst[4]>", line 1, in <module>
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/fido_factory.py", line 312, in search
    results = query_walker.create(query, self)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/attr.py", line 613, in create
    return self.createmm(self, *args, **kwargs)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/util/functools.py", line 18, in wrapper
    return dispatcher.dispatch(args[1].__class__)(*args, **kwargs)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/fido_factory.py", line 241, in _create_and
    return factory._make_query_to_client(*query.attrs)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/fido_factory.py", line 484, in _make_query_to_client
    results.append(tmpclient.search(*query, **kwargs))
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/jsoc/jsoc.py", line 304, in search
    return_results = astropy.table.vstack([return_results, self._lookup_records(iargs)])
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/sunpy/net/jsoc/jsoc.py", line 763, in _lookup_records
    result = client.query(ds, key=key, rec_index=isMeta)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/drms/client.py", line 1073, in query
    self._convert_numeric_keywords(ds, res_key, skip_conversion)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/drms/client.py", line 653, in _convert_numeric_keywords
    kdf.loc[idx, k] = kdf.loc[idx, k].map(lambda x: int(x, base=16))
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/pandas/core/indexing.py", line 819, in __setitem__
    iloc._setitem_with_indexer(indexer, value, self.name)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/pandas/core/indexing.py", line 1796, in _setitem_with_indexer
    self._setitem_with_indexer_split_path(indexer, value, name)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/pandas/core/indexing.py", line 1839, in _setitem_with_indexer_split_path
    self._setitem_single_column(ilocs[0], value, pi)
  File "/home/runner/work/sunpy/sunpy/.tox/py39-online/lib/python3.9/site-packages/pandas/core/indexing.py", line 2024, in _setitem_single_column
    warnings.warn(
FutureWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`
/home/runner/work/sunpy/sunpy/docs/guide/acquiring_data/jsoc.rst:60: UnexpectedException

To Reproduce

import sunpy

sunpy.map.Map(...)
etc

Screenshots

No response

System Details

No response

Installation method

No response

@dstansby dstansby changed the title pandas warning pandas warnings Sep 29, 2022
@dstansby
Copy link
Member Author

dstansby commented Oct 4, 2022

@nabobalis as per #73 (comment) could you re-open this?

@nabobalis nabobalis reopened this Oct 4, 2022
@dstansby
Copy link
Member Author

dstansby commented Oct 4, 2022

I think we're actually seeing pandas-dev/pandas#48673 with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants