mirror of
				https://github.com/clearml/clearml
				synced 2025-06-26 18:16:07 +00:00 
			
		
		
		
	Add support for ploytle table as list of lists (not just pandas DataFrame)
This commit is contained in:
		
							parent
							
								
									c630ba3ea3
								
							
						
					
					
						commit
						665bfc5ca8
					
				| @ -477,7 +477,7 @@ def create_plotly_table(table_plot, title, series, layout_config=None): | ||||
|     """ | ||||
|     Create a basic Plotly table json style to be sent | ||||
| 
 | ||||
|     :param table_plot: the output table in pandas.DataFrame structure | ||||
|     :param table_plot: the output table in pandas.DataFrame structure or list of rows (list) in a table | ||||
|     :param title: Title (AKA metric) | ||||
|     :type title: str | ||||
|     :param series: Series (AKA variant) | ||||
| @ -485,6 +485,10 @@ def create_plotly_table(table_plot, title, series, layout_config=None): | ||||
|     :param layout_config: additional configuration layout | ||||
|     :return: dict with plotly data. | ||||
|     """ | ||||
|     if table_plot and isinstance(table_plot, (list, tuple)) and table_plot[0] and isinstance(table_plot[0], (list, tuple)): | ||||
|         headers_values = table_plot[0] | ||||
|         cells_values = [list(i) for i in zip(*table_plot[1:])] | ||||
|     else: | ||||
|         if not pd: | ||||
|             raise UsageError( | ||||
|                 "pandas is required in order to support reporting tables using CSV or a URL, " | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 allegroai
						allegroai