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

Aeronet's import_aeronet_data returning indexing error #61

Closed
soypat opened this issue Apr 21, 2020 · 2 comments
Closed

Aeronet's import_aeronet_data returning indexing error #61

soypat opened this issue Apr 21, 2020 · 2 comments

Comments

@soypat
Copy link

soypat commented Apr 21, 2020

Using a .dubovik file acquired using the step-by-step method returns error.

/usr/local/lib/python3.6/dist-packages/Py6S/SixSHelpers/aeronet.py in _get_aot(cls, df)
    206 
    207         # Remove the columns for AOT wavelengths with no data
--> 208         aot_df = df.ix[:, inds]
    209         aot_df = aot_df.dropna(axis=1, how='all')
    210         aot_df = aot_df.dropna(axis=0, how='any')

/usr/local/lib/python3.6/dist-packages/pandas/core/generic.py in __getattr__(self, name)
   5272             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5273                 return self[name]
-> 5274             return object.__getattribute__(self, name)
   5275 
   5276     def __setattr__(self, name: str, value) -> None:

AttributeError: 'DataFrame' object has no attribute 'ix'

A attribute/key check of the dataframe could be useful to spot errors early on and not raise them within the code.

@robintw
Copy link
Owner

robintw commented Apr 21, 2020

Thanks - this is the same as #59, and I've just fixed it - will push commits and do a new release shortly.

@robintw
Copy link
Owner

robintw commented Apr 21, 2020

Fixed in 7a6da6e.

@robintw robintw closed this as completed Apr 21, 2020
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

2 participants