Skip to content

Commit 64017f6

Browse files
committed
Correct "sentinel" spelling.
1 parent 08f0609 commit 64017f6

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

doc/source/missing_data.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Datetimes
9393
---------
9494

9595
For datetime64[ns] types, ``NaT`` represents missing values. This is a pseudo-native
96-
sentinal value that can be represented by numpy in a singular dtype (datetime64[ns]).
96+
sentinel value that can be represented by numpy in a singular dtype (datetime64[ns]).
9797
Pandas objects provide intercompatibility between ``NaT`` and ``NaN``.
9898

9999
.. ipython:: python

pandas/core/common.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2332,11 +2332,11 @@ def _where_compat(mask, arr1, arr2):
23322332
return np.where(mask, arr1, arr2)
23332333

23342334

2335-
def sentinal_factory():
2336-
class Sentinal(object):
2335+
def sentinel_factory():
2336+
class Sentinel(object):
23372337
pass
23382338

2339-
return Sentinal()
2339+
return Sentinel()
23402340

23412341

23422342
def in_interactive_session():

pandas/core/format.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,8 @@ def _column_header():
740740
template = 'colspan="%d" halign="left"'
741741

742742
# GH3547
743-
sentinal = com.sentinal_factory()
744-
levels = self.columns.format(sparsify=sentinal, adjoin=False,
743+
sentinel = com.sentinel_factory()
744+
levels = self.columns.format(sparsify=sentinel, adjoin=False,
745745
names=False)
746746
# Truncate column names
747747
if len(levels[0]) > self.max_cols:
@@ -750,7 +750,7 @@ def _column_header():
750750
else:
751751
truncated = False
752752

753-
level_lengths = _get_level_lengths(levels, sentinal)
753+
level_lengths = _get_level_lengths(levels, sentinel)
754754

755755
row_levels = self.frame.index.nlevels
756756

@@ -859,14 +859,14 @@ def _write_hierarchical_rows(self, fmt_values, indent):
859859
if self.fmt.sparsify:
860860

861861
# GH3547
862-
sentinal = com.sentinal_factory()
863-
levels = frame.index[:nrows].format(sparsify=sentinal,
862+
sentinel = com.sentinel_factory()
863+
levels = frame.index[:nrows].format(sparsify=sentinel,
864864
adjoin=False, names=False)
865865
# Truncate row names
866866
if truncate:
867867
levels = [lev[:self.max_rows] for lev in levels]
868868

869-
level_lengths = _get_level_lengths(levels, sentinal)
869+
level_lengths = _get_level_lengths(levels, sentinel)
870870

871871
for i in range(min(len(frame), self.max_rows)):
872872
row = []
@@ -905,14 +905,14 @@ def _write_hierarchical_rows(self, fmt_values, indent):
905905
self.write_tr(row, indent, self.indent_delta, tags=None)
906906

907907

908-
def _get_level_lengths(levels, sentinal=''):
908+
def _get_level_lengths(levels, sentinel=''):
909909
from itertools import groupby
910910

911911
def _make_grouper():
912912
record = {'count': 0}
913913

914914
def grouper(x):
915-
if x != sentinal:
915+
if x != sentinel:
916916
record['count'] += 1
917917
return record['count']
918918
return grouper

pandas/core/index.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2371,16 +2371,16 @@ def format(self, space=2, sparsify=None, adjoin=True, names=False,
23712371
sparsify = get_option("display.multi_sparse")
23722372

23732373
if sparsify:
2374-
sentinal = ''
2374+
sentinel = ''
23752375
# GH3547
2376-
# use value of sparsify as sentinal, unless it's an obvious
2376+
# use value of sparsify as sentinel, unless it's an obvious
23772377
# "Truthey" value
23782378
if sparsify not in [True, 1]:
2379-
sentinal = sparsify
2379+
sentinel = sparsify
23802380
# little bit of a kludge job for #1217
23812381
result_levels = _sparsify(result_levels,
23822382
start=int(names),
2383-
sentinal=sentinal)
2383+
sentinel=sentinel)
23842384

23852385
if adjoin:
23862386
return com.adjoin(space, *result_levels).split('\n')
@@ -3379,7 +3379,7 @@ def _wrap_joined_index(self, joined, other):
33793379

33803380
# For utility purposes
33813381

3382-
def _sparsify(label_list, start=0, sentinal=''):
3382+
def _sparsify(label_list, start=0, sentinel=''):
33833383
pivoted = lzip(*label_list)
33843384
k = len(label_list)
33853385

@@ -3396,7 +3396,7 @@ def _sparsify(label_list, start=0, sentinal=''):
33963396
break
33973397

33983398
if p == t:
3399-
sparse_cur.append(sentinal)
3399+
sparse_cur.append(sentinel)
34003400
else:
34013401
sparse_cur.extend(cur[i:])
34023402
result.append(sparse_cur)

0 commit comments

Comments
 (0)