Skip to content

Commit b349e9f

Browse files
author
Pradeep Reddy Raamana
committed
better docs
1 parent 12beded commit b349e9f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

README.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,31 @@ Installation
6767
Usage
6868
------------
6969

70-
Let's say you have all the data in a pandas `DataFrame`, where subject IDs are in a ``sub_ids`` column
71-
and variable names are in a ``var_names`` column, and they belong to groups identified by ``sub_class`` and ``var_group``,
70+
Let's say you have all the data in a pandas `DataFrame`, where subject IDs are in a ``'sub_ids'`` column
71+
and variable names are in a ``'var_names'`` column, and they belong to groups identified by ``sub_class`` and ``var_group``,
7272
you can use the following code produce the ``blackholes`` plot:
7373

7474
.. code-block:: python
7575
7676
from missingdata import blackholes
7777
78-
blackholes(data_frame, label_rows_with='sub_ids', label_cols_with='var_names')
78+
blackholes(data_frame,
79+
label_rows_with='sub_ids', label_cols_with='var_names',
80+
group_rows_by=sub_class, group_cols_by=var_group)
7981
8082
8183
8284
If you were interested in seeing subjects/variables with least amount of missing data, you can control miss perc window
83-
with ``filter_spec_samples`` and ``filter_spec_variables`` by passing a tuple of two floats e.g. (0, 0.1) which
85+
with ``filter_spec_samples`` and/or ``filter_spec_variables`` by passing a tuple of two floats e.g. (0, 0.1) which
8486
will filter away those with more than 10% of missing data.
8587

8688
.. code-block:: python
8789
8890
from missingdata import blackholes
8991
90-
blackholes(data_frame, label_rows_with='sub_ids', label_cols_with='var_names')
92+
blackholes(data_frame,
93+
label_rows_with='sub_ids', label_cols_with='var_names',
94+
filter_spec_samples=(0, 0.1))
9195
9296
9397
The other parameters for the function are self-explanatory.

0 commit comments

Comments
 (0)