zero323 commented on a change in pull request #34227:
URL: https://github.com/apache/spark/pull/34227#discussion_r725404588



##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -397,22 +400,24 @@ def read_csv(
     if nrows is not None:
         sdf = sdf.limit(nrows)
 
+    index_spark_column_names: List[str]
+    index_names: List[Label]
     if index_col is not None:
         if isinstance(index_col, (str, int)):
             index_col = [index_col]
         for col in index_col:
             if col not in column_labels:
                 raise KeyError(col)
         index_spark_column_names = [column_labels[col] for col in index_col]
-        index_names = [(col,) for col in index_col]  # type: List[Label]
+        index_names = [(col,) for col in index_col]
         column_labels = OrderedDict(
             (label, col) for label, col in column_labels.items() if label not 
in index_col
         )
     else:
         index_spark_column_names = []
         index_names = []
 
-    psdf = DataFrame(
+    psdf: DataFrame = DataFrame(

Review comment:
       Is this really needed?




-- 
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