File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ def pprint_thing(
177177 max_seq_items : int | None = None ,
178178) -> str :
179179 """
180- Convert object to a string representation, respecting display.precision for Real numbers .
180+ Convert object to a string representation.
181181
182182 Parameters
183183 ----------
@@ -199,8 +199,6 @@ def pprint_thing(
199199 str
200200 String representation of the object.
201201 """
202-
203-
204202 def as_escaped_string (
205203 thing : Any , escape_chars : EscapeChars | None = escape_chars
206204 ) -> str :
@@ -214,7 +212,6 @@ def as_escaped_string(
214212 else :
215213 escape_chars = escape_chars or ()
216214
217- # is_float kullanımına geçiş yapıyoruz
218215 if is_float (thing ):
219216 result = f"{ thing :.{get_option ('display.precision' )}f} "
220217 else :
Original file line number Diff line number Diff line change @@ -82,10 +82,11 @@ def test_repr_mapping(self):
8282 assert printing .pprint_thing (MyMapping ()) == "{'a': 4, 'b': 4}"
8383
8484 def test_pprint_thing_real_precision (self ):
85+ from pandas .io .formats .printing import pprint_thing
8586 with option_context ('display.precision' , 3 ):
86- assert printing . pprint_thing (3.14159265359 ) == "3.142"
87+ assert pprint_thing (3.14159265359 ) == "3.142"
8788 with option_context ('display.precision' , 2 ):
88- assert printing . pprint_thing (3.14159265359 ) == "3.14"
89+ assert pprint_thing (3.14159265359 ) == "3.14"
8990
9091
9192class TestFormatBase :
You can’t perform that action at this time.
0 commit comments