Skip to content

Commit 0fda7bf

Browse files
authored
upgrade style (#38)
1 parent a6d842a commit 0fda7bf

File tree

4 files changed

+46
-6
lines changed

4 files changed

+46
-6
lines changed

_doc/examples/first_step.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
pandas to pandas_streaming
88
++++++++++++++++++++++++++
99
"""
10+
1011
import glob
1112
from pandas import DataFrame
1213
from pandas_streaming.df import StreamingDataFrame

_doc/sg_execution_times.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

_unittests/ut_df/test_dataframe_helpers_simple.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ def test_unfold(self):
2323

2424
# fold
2525
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+
)
2931
)
3032
bf = folded.reset_index(drop=False)
3133
bf.columns = ["a", "b"]

pandas_streaming/df/dataframe_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ def pandas_groupby_nan(
475475
): # pylint: disable=C0200
476476
if new_index[i] == key:
477477
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+
)
481481
else:
482482
raise NotImplementedError( # pragma: no cover
483483
"NaN values not implemented for multiindex."

0 commit comments

Comments
 (0)