File tree Expand file tree Collapse file tree 4 files changed +46
-6
lines changed Expand file tree Collapse file tree 4 files changed +46
-6
lines changed Original file line number Diff line number Diff line change 7
7
pandas to pandas_streaming
8
8
++++++++++++++++++++++++++
9
9
"""
10
+
10
11
import glob
11
12
from pandas import DataFrame
12
13
from pandas_streaming .df import StreamingDataFrame
Original file line number Diff line number Diff line change
1
+
2
+ :orphan:
3
+
4
+ .. _sphx_glr_sg_execution_times :
5
+
6
+
7
+ Computation times
8
+ =================
9
+ **00:00.000 ** total execution time for 1 file **from all galleries **:
10
+
11
+ .. container ::
12
+
13
+ .. raw :: html
14
+
15
+ <style scoped >
16
+ <link href="https://cdnjs.cloudflare .com/ajax/libs/twitter-bootstrap /5.3 .0/css/bootstrap.min .css" rel="stylesheet" />
17
+ <link href="https://cdn.datatables .net/1.13 .6/css/dataTables.bootstrap5.min .css" rel="stylesheet" />
18
+ </style >
19
+ <script src =" https://code.jquery.com/jquery-3.7.0.js" ></script >
20
+ <script src =" https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js" ></script >
21
+ <script src =" https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js" ></script >
22
+ <script type =" text/javascript" class =" init" >
23
+ $ (document ).ready ( function () {
24
+ $ (' table.sg-datatable' ).DataTable ({order: [[1 , ' desc' ]]});
25
+ } );
26
+ </script >
27
+
28
+ .. list-table ::
29
+ :header-rows: 1
30
+ :class: table table-striped sg-datatable
31
+
32
+ * - Example
33
+ - Time
34
+ - Mem (MB)
35
+ * - :ref: `sphx_glr_auto_examples_first_step.py ` (``examples/first_step.py ``)
36
+ - 00:00.000
37
+ - 0.0
Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ def test_unfold(self):
23
23
24
24
# fold
25
25
folded = df2 .groupby ("a" ).apply (
26
- lambda row : "," .join (row ["b_unfold" ].dropna ())
27
- if len (row ["b_unfold" ].dropna ()) > 0
28
- else numpy .nan
26
+ lambda row : (
27
+ "," .join (row ["b_unfold" ].dropna ())
28
+ if len (row ["b_unfold" ].dropna ()) > 0
29
+ else numpy .nan
30
+ )
29
31
)
30
32
bf = folded .reset_index (drop = False )
31
33
bf .columns = ["a" , "b" ]
Original file line number Diff line number Diff line change @@ -475,9 +475,9 @@ def pandas_groupby_nan(
475
475
): # pylint: disable=C0200
476
476
if new_index [i ] == key :
477
477
new_index [i ] = numpy .nan
478
- res .grouper .groupings [0 ]._cache [
479
- "result_index"
480
- ] = index . __class__ ( new_index )
478
+ res .grouper .groupings [0 ]._cache ["result_index" ] = (
479
+ index . __class__ ( new_index )
480
+ )
481
481
else :
482
482
raise NotImplementedError ( # pragma: no cover
483
483
"NaN values not implemented for multiindex."
You can’t perform that action at this time.
0 commit comments