MCPcopy
hub / github.com/ResidentMario/missingno / nullity_sort

Function nullity_sort

missingno/missingno.py:26–39  ·  view source on GitHub ↗

Sorts a DataFrame according to its nullity, in either ascending or descending order. :param df: The DataFrame object being sorted. :param sort: The sorting method: either "ascending", "descending", or None (default). :return: The nullity-sorted DataFrame.

(df, sort=None)

Source from the content-addressed store, hash-verified

24
25
26def nullity_sort(df, sort=None):
27 """
28 Sorts a DataFrame according to its nullity, in either ascending or descending order.
29
30 :param df: The DataFrame object being sorted.
31 :param sort: The sorting method: either "ascending", "descending", or None (default).
32 :return: The nullity-sorted DataFrame.
33 """
34 _df = df
35 if sort == "ascending":
36 _df = _ascending_sort(df)
37 elif sort == "descending":
38 _df = _descending_sort(df)
39 return _df
40
41
42def _n_top_complete_filter(df, n):

Callers 4

matrixFunction · 0.85
barFunction · 0.85
heatmapFunction · 0.85
dendrogramFunction · 0.85

Calls 2

_ascending_sortFunction · 0.85
_descending_sortFunction · 0.85

Tested by

no test coverage detected