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_width_ratios_matrix(self):
msno.matrix(self.simple_df, width_ratios=(30, 1))
return plt.gcf()
def test_no_sparkline_matrix(self):
msno.matrix(self.simple_df, sparkline=False)
return plt.gcf()
def test_simple_matrix(self):
msno.matrix(self.simple_df)
return plt.gcf()
def test_freq_matrix(self):
msno.matrix(self.freq_df, freq='BQ')
return plt.gcf()
def test_fontsize_matrix(self):
msno.matrix(self.simple_df, fontsize=8)
return plt.gcf()
def test_large_matrix(self):
msno.matrix(self.large_df)
return plt.gcf()
def test_simple_heatmap(self):
msno.heatmap(self.simple_df)
return plt.gcf()
def test_alternative_colormap_heatmap(self):
msno.heatmap(self.simple_df, cmap='viridis')
return plt.gcf()
def test_unlabelled_heatmap(self):
msno.heatmap(self.simple_df, labels=False)
return plt.gcf()
def test_percentile_cutoff_top_p(self):
expected = self.df.loc[:, ['B', 'C']]
result = msno.nullity_filter(self.df, p=0.6, filter='top')
assert result.equals(expected)