Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_method_dendrogram(self):
msno.dendrogram(self.simple_df, method='single')
return plt.gcf()
def test_orientation_dendrogram(self):
msno.dendrogram(self.simple_df, orientation='right')
return plt.gcf()
def test_simple_dendrogram(self):
msno.dendrogram(self.simple_df)
return plt.gcf()
"""Plot the nullility dendogram of missing data within a DataFrame.
Args:
data (pd.DataFrame): DataFrame to plot.
**kwargs: Keyword arguments for plot. Passed to missingno.dendogram.
Returns:
matplotlib.axes._subplots.AxesSubplot: nullility dendogram plot.
Raises:
TypeError: if data is not a DataFrame. Error raised through decorator.
ValueError: dataset fully observed. Raised through helper method.
"""
_fully_complete(data)
_default_plot_args(**kwargs)
msno.dendrogram(data, **kwargs)
def missing_dendrogram(data: pd.DataFrame) -> str:
"""Generate a dendrogram plot for missing values.
Args:
data: Pandas DataFrame to generate missing values dendrogram plot from.
Returns:
The resulting missing values dendrogram plot encoded as a string.
"""
missingno.dendrogram(data, fontsize=get_font_size(data) * 2.0)
plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2)
return plot_360_n0sc0pe(plt)