@@ -36,7 +36,7 @@ def read_csv(
3636 type_ : Optional [Text ] = TYPE_PANDAS ,
3737 n_partitions : Optional [int ] = 1 ,
3838 ** kwargs
39- ):
39+ ) -> MoveDataFrame :
4040 """
4141 Reads a `csv` file and structures the data.
4242
@@ -349,7 +349,7 @@ def object_for_array(object_: Text) -> ndarray:
349349 return conv .astype ('object_' )
350350
351351
352- def column_to_array (data : DataFrame , column : Text ):
352+ def column_to_array (data : DataFrame , column : Text ) -> DataFrame :
353353 """
354354 Transforms all columns values to list.
355355
@@ -377,12 +377,12 @@ def column_to_array(data: DataFrame, column: Text):
377377 3 39.984211 116.319389 2008-10-23 05:53:16 1 [7,8]
378378 4 39.984217 116.319422 2008-10-23 05:53:21 1 [9,10]
379379 >>> column_to_array(moveDf, column = 'list_column')
380- lat lon datetime id list_column
381- 0 39.984094 116.319236 2008-10-23 05:53:05 1 [1.0,2.0]
382- 1 39.984198 116.319322 2008-10-23 05:53:06 1 [3.0,4.0]
383- 2 39.984224 116.319402 2008-10-23 05:53:11 1 [5.0,6.0]
384- 3 39.984211 116.319389 2008-10-23 05:53:16 1 [7.0,8.0]
385- 4 39.984217 116.319422 2008-10-23 05:53:21 1 [9.0,10.0]
380+ lat lon datetime id list_column
381+ 0 39.984094 116.319236 2008-10-23 05:53:05 1 [1.0,2.0]
382+ 1 39.984198 116.319322 2008-10-23 05:53:06 1 [3.0,4.0]
383+ 2 39.984224 116.319402 2008-10-23 05:53:11 1 [5.0,6.0]
384+ 3 39.984211 116.319389 2008-10-23 05:53:16 1 [7.0,8.0]
385+ 4 39.984217 116.319422 2008-10-23 05:53:21 1 [9.0,10.0]
386386 """
387387 data = data .copy ()
388388 if column not in data :
0 commit comments