File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
extensions/positron-python/python_files/posit/positron Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -769,21 +769,28 @@ def _summarize_data(self, path: list[str]):
769
769
)
770
770
771
771
profiles = []
772
+ skipped_columns = []
772
773
for i , column in enumerate (schema .columns ):
774
+ summary_stats = None
773
775
try :
774
776
summary_stats = table_view ._prof_summary_stats (i , format_options ) # noqa: SLF001
775
- profiles .append (
776
- {
777
- "column_name" : column .column_name ,
778
- "type_display" : column .type_display ,
779
- "summary_stats" : summary_stats ,
780
- }
781
- )
782
777
except Exception as e :
783
- # Skip columns that can't be summarized
784
- logger . warning ( f"Skipping summary stats for column { i } ( { column .column_name } ): { e } " )
778
+ # Collect failed columns for later logging
779
+ skipped_columns . append (( i , column .column_name , e ) )
785
780
continue
786
781
782
+ profiles .append (
783
+ {
784
+ "column_name" : column .column_name ,
785
+ "type_display" : column .type_display ,
786
+ "summary_stats" : summary_stats ,
787
+ }
788
+ )
789
+
790
+ # Log all skipped columns at once
791
+ for i , column_name , error in skipped_columns :
792
+ logger .warning (f"Skipping summary stats for column { i } ({ column_name } ): { error } " )
793
+
787
794
self ._send_result (
788
795
{
789
796
"schema" : {
You can’t perform that action at this time.
0 commit comments