-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature/return df #76
Conversation
@CoryMartin-NOAA still need to go through the other files for |
@kevindougherty-noaa can you explain to @ADCollard and me why this PR is needed? I'm sure it is a method vs attribute thing but it's not clear to me at the moment. |
@CoryMartin-NOAA @ADCollard Sure thing. In our regional DA meeting last week, Ting and Shun mentioned interest in being able to have the entire dataframe returned. I could be mistaken and maybe they meant returning the dataframe after being indexed. |
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.
See comment.
pyGSI/diags.py
Outdated
def return_df(self): | ||
"""Returns working dataframe.""" | ||
return self.data_df | ||
|
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.
Why can't you add this method in Class GSIdiag
since that is the class from which all other inherit from?
@kevindougherty-noaa yes I remember that, so I guess you're saying this is so one can have numpy arrays if they want, and a Pandas dataframe through the
or whatever the above pseudo code should be |
@CoryMartin-NOAA you are right, that is what should be done. I will fix. |
pyGSI/diags.py
Outdated
} | ||
|
||
return data | ||
if return_df: |
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.
@kevindougherty-noaa is this indentation correct?
'monitored': v_monitored} | ||
|
||
return u, v | ||
if return_df: |
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.
so for non data frame, it returns a dict of dicts, for u,v. For the data frame case, are both u and v inside the data frame?
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.
Yes, both u and v are in the dataframe. All the variables will be included.
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.
Just a quick glance.
See if you notice these as well.
Co-authored-by: Rahul Mahajan <[email protected]>
Co-authored-by: Rahul Mahajan <[email protected]>
Based on conversations with @CoryMartin-NOAA and @aerorahul, I am going to close this PR and develop |
Addresses #75