Skip to content

BUG: changed Dtype to dtype on series displays #2959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _get_footer(self):
if getattr(self.series.dtype,'name',None):
if footer:
footer += ', '
footer += 'Dtype: %s' % com.pprint_thing(self.series.dtype.name)
footer += 'dtype: %s' % com.pprint_thing(self.series.dtype.name)

return unicode(footer)

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3305,7 +3305,7 @@ def _repr_footer(self):

namestr = "Name: %s, " % str(
self.name) if self.name is not None else ""
return '%s%sLength: %d, Dtype: %s' % (freqstr, namestr, len(self),
return '%s%sLength: %d, dtype: %s' % (freqstr, namestr, len(self),
com.pprint_thing(self.dtype.name))

def to_timestamp(self, freq=None, how='start', copy=True):
Expand Down
8 changes: 4 additions & 4 deletions pandas/tests/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_to_string_repr_unicode(self):
line = line.decode(get_option("display.encoding"))
except:
pass
if not line.startswith('Dtype:'):
if not line.startswith('dtype:'):
self.assert_(len(line) == line_len)

# it works even if sys.stdin in None
Expand Down Expand Up @@ -1081,7 +1081,7 @@ def test_float_trim_zeros(self):
2.03954217305e+10, 5.59897817305e+10]
skip = True
for line in repr(DataFrame({'A': vals})).split('\n'):
if line.startswith('Dtype:'):
if line.startswith('dtype:'):
continue
if _three_digit_exp():
self.assert_(('+010' in line) or skip)
Expand Down Expand Up @@ -1143,7 +1143,7 @@ def test_to_string(self):
cp.name = 'foo'
result = cp.to_string(length=True, name=True, dtype=True)
last_line = result.split('\n')[-1].strip()
self.assertEqual(last_line, "Freq: B, Name: foo, Length: %d, Dtype: float64" % len(cp))
self.assertEqual(last_line, "Freq: B, Name: foo, Length: %d, dtype: float64" % len(cp))

def test_freq_name_separation(self):
s = Series(np.random.randn(10),
Expand Down Expand Up @@ -1199,7 +1199,7 @@ def test_float_trim_zeros(self):
vals = [2.08430917305e+10, 3.52205017305e+10, 2.30674817305e+10,
2.03954217305e+10, 5.59897817305e+10]
for line in repr(Series(vals)).split('\n'):
if line.startswith('Dtype:'):
if line.startswith('dtype:'):
continue
if _three_digit_exp():
self.assert_('+010' in line)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def test_multilevel_name_print(self):
"qux one 7",
" two 8",
" three 9",
"Name: sth, Dtype: int64"]
"Name: sth, dtype: int64"]
expected = "\n".join(expected)
self.assertEquals(repr(s), expected)

Expand Down
2 changes: 1 addition & 1 deletion pandas/tseries/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def test_series_repr_nat(self):
'1 1970-01-01 00:00:00.000001\n'
'2 1970-01-01 00:00:00.000002\n'
'3 NaT\n'
'Dtype: datetime64[ns]')
'dtype: datetime64[ns]')
self.assertEquals(result, expected)

def test_fillna_nat(self):
Expand Down