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

Creates the question object #188

Closed
wants to merge 6 commits into from

Conversation

jwdebelius
Copy link
Contributor

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.

@jwdebelius
Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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',
Copy link
Member

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_`.

Copy link
Contributor

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?

@jwdebelius jwdebelius closed this May 26, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants