def missing_matrix(data: pd.DataFrame) -> str: """Generate missing values matrix plot Args: data: Pandas DataFrame to generate missing values matrix from. Returns: The resulting missing values matrix encoded as a string. """ with matplotlib.style.context([ "seaborn-ticks", str(get_resource("styles/pandas_profiling_frame.mplstyle")) ]): labels = config["plot"]["missing"]["force_labels"].get(bool) ax = missingno.matrix( data, figsize=(10, 4), color=hex_to_rgb( config["html"]["style"]["primary_color"].get(str)), fontsize=get_font_size(data) / 20 * 16, sparkline=False, labels=labels, ) for _, spine in ax.spines.items(): spine.set_visible(True) plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2) return plot_360_n0sc0pe(plt)
def missing_matrix(data: pd.DataFrame) -> str: """Generate missing values matrix plot Args: data: Pandas DataFrame to generate missing values matrix from. Returns: The resulting missing values matrix encoded as a string. """ labels = True missingno.matrix( data, figsize=(10, 4), color=hex_to_rgb("#337ab7"), fontsize=10, sparkline=False, labels=labels, ) plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2) return plot_360_n0sc0pe(plt)
def missing_matrix(data: pd.DataFrame) -> str: """Generate missing values matrix plot Args: data: Pandas DataFrame to generate missing values matrix from. Returns: The resulting missing values matrix encoded as a string. """ labels = config["plot"]["missing"]["force_labels"].get(bool) missingno.matrix( data, figsize=(10, 4), color=hex_to_rgb(config["html"]["style"]["primary_color"].get(str)), fontsize=get_font_size(data) / 20 * 16, sparkline=False, labels=labels, ) plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2) return plot_360_n0sc0pe(plt)
def missing_matrix(config: Settings, data: pd.DataFrame) -> str: """Generate missing values matrix plot Args: config: Settings data: Pandas DataFrame to generate missing values matrix from. Returns: The resulting missing values matrix encoded as a string. """ missingno.matrix( data, figsize=(10, 4), fontsize=get_font_size(data) / 20 * 16, sparkline=False, color=hex_to_rgb(config.html.style.primary_color), labels=config.plot.missing.force_labels, ) plt.subplots_adjust(left=0.1, right=0.9, top=0.7, bottom=0.2) return plot_360_n0sc0pe(config)