Skip to content

Commit 5a1bb27

Browse files
committed
ENH: string format None and None and not NaN
1 parent 4c39163 commit 5a1bb27

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/core/common.py

+2
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,8 @@ def _make_int_format(x):
595595
return _make_int_format(s)
596596
else:
597597
if na_rep is not None and lib.checknull(s):
598+
if s is None:
599+
return 'None'
598600
return na_rep
599601
else:
600602
# object dtype

scripts/roll_median_leak.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
proc = psutil.Process(pid)
1616

1717
lst = SparseList()
18-
lst.append([5] * 5)
18+
lst.append([5] * 10000)
1919
lst.append(np.repeat(np.nan, 1000000))
2020

21-
sdf = SparseDataFrame({'A' : lst.to_array()})
22-
2321
for _ in xrange(10000):
2422
print proc.get_memory_info()
23+
sdf = SparseDataFrame({'A' : lst.to_array()})
2524
chunk = sdf[sdf['A'] == 5]

0 commit comments

Comments
 (0)