-
Notifications
You must be signed in to change notification settings - Fork 81
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
Creates the question object #188
Conversation
Bumping this, because Im hoping to get a bunch of stuff in and this is necessary for all the question objects... |
@@ -0,0 +1,21 @@ | |||
import os | |||
|
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 logic is already in americangut/__init__.py
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.
Should the __init__
document just be empty then? If so, sorry.
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.
ya, that should be fine
On Tue, Jan 26, 2016 at 11:08 PM, J W Debelius notifications@github.com
wrote:
In americangut/question/init.py
#188 (comment):@@ -0,0 +1,21 @@
+import os
+Should the init document just be empty then? If so, sorry.
—
Reply to this email directly or view it on GitHub
https://github.com/biocore/American-Gut/pull/188/files#r50908796.
map_[self.name] = map_[self.name].apply(remap_).astype(self.dtype) | ||
map_.replace('nan', np.nan, inplace=True) | ||
|
||
if watch and self.type in {'Categorical', 'Multiple', 'Clinical', |
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.
Does this indicate that the base class has strong knowledge of derived classes?
map_ : DataFrame | ||
A pandas object containing the data to be analyzed. The | ||
Question `name` should be a column in the `map_`. | ||
|
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.
Would it help to have a raises section here?
First of the data dictionary objects referenced in #186.
The idea of the question object is to create a modular plug in system to facilitate analysis by other groups. Questions are prepopulated with features of the data including data type, any remapping functions which are used, and handy functions associated with common data types. The collection of objects can then be combined into a dictionary, and the dictionary be called as an underlying API for a set of easy, pretty functions.
This is a base class object for the question object.