luizotavio32 commented on code in PR #35586:
URL: https://github.com/apache/superset/pull/35586#discussion_r2417772936


##########
superset/commands/database/uploaders/csv_reader.py:
##########
@@ -326,6 +326,26 @@ def _cast_column_types(
             CSVReader._cast_single_column(df, column, dtype, kwargs)
         return df
 
+    @staticmethod
+    def _split_types(types: dict[str, str]) -> tuple[dict[str, str], dict[str, 
str]]:
+        """
+        Split column data types into custom and pandas-native types.
+
+        :param types: Dictionary mapping column names to data types
+        :return: Tuple of (custom_types, pandas_types) dictionaries
+        """
+        pandas_types = {
+            col: dtype
+            for col, dtype in types.items()
+            if dtype in ("str", "object", "string")
+        }

Review Comment:
   The idea is to only choose text related types to let pandas do the casting 
automatically



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to