-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove panel #27
Remove panel #27
Conversation
Current implementation requires converting each DataFrame to a Dataset. Would likely be better if we could just make a Dataset in a single go. I've been having trouble with that though and wanted to get something up. Working solution > no solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review with some style things.
CHANGELOG.md
Outdated
@@ -2,6 +2,9 @@ | |||
All notable changes to this project will be documented in this file. | |||
This project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
## [0.1.4] - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a placeholder for the date so it isn't forgotten.
pysatSeasons/_core.py
Outdated
""" | ||
Repackages numbers, Series, or DataFrames | ||
Repackages input data into xarray.Dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix docstring formatting
pysatSeasons/_core.py
Outdated
output[data.name] = data | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output[data.name] = data | |
output[data.name] = data |
pysatSeasons/_core.py
Outdated
@@ -1,12 +1,13 @@ | |||
import pandas as pds | |||
import xarray as xr | |||
|
|||
|
|||
def computational_form(data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a more descriptive name. Maybe "to_xarray_dataset"?
pysatSeasons/_core.py
Outdated
output[var] = xr.concat(data, 'pysat_binning') | ||
|
||
elif isinstance(data[0], pds.DataFrame): | ||
# Convert data to xarray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the whole routine does, make comment more specific.
pysatSeasons/avg.py
Outdated
from __future__ import print_function | ||
from __future__ import absolute_import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
pysatSeasons/avg.py
Outdated
@@ -23,77 +25,74 @@ def median1D(const, bin1, label1, data_label, auto_bin=True, returnData=False): | |||
binX: array-like | |||
List holding [min, max, number of bins] or array-like containing | |||
bin edges, where X = 1, 2 | |||
labelX: string | |||
labelX: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove camelCase variable names
Thanks for the comments @aburrell. Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Note that the version caps in setup.cfg need to be removed as well for when people are installing through pip.
Co-authored-by: Jeff Klenzing <jklenzing@gmail.com> Co-authored-by: Angeline Burrell <aburrell@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks @rstoneback
Just realized the changelog should probably show this as 0.2.0. |
Description
Addresses #4, start on #3
Removes
pandas.Panel
from package.Starts to switch code over to using xarray as main data format rather than something pandas based.
Tweaked general averaging code to reduce specificity with pandas. Started modifying
computational_form
to enable it's use in more areas.The code is old, standards wise. Happy to sort that out as time goes on but a decent chunk of existing code may get deleted. I'd rather not make soon to be deleted code pretty. Overall plan is to reserve general comment and docstring improvements until after the transition to supporting xarray, as well as general nD binning support, is complete.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details for
your test configuration
Test Configuration:
Checklist:
develop
(notmain
) branchCHANGELOG.md
, summarizing the changes