File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
121
121
pandas/io/parsers/ \
122
122
pandas/io/sas/ \
123
123
pandas/io/sql.py \
124
+ pandas/io/formats/format.py \
124
125
pandas/tseries/
125
126
RET=$(( $RET + $? )) ; echo $MSG " DONE"
126
127
Original file line number Diff line number Diff line change @@ -1956,16 +1956,14 @@ def __call__(self, num: int | float) -> str:
1956
1956
"""
1957
1957
Formats a number in engineering notation, appending a letter
1958
1958
representing the power of 1000 of the original number. Some examples:
1959
-
1960
- >>> format_eng(0) # for self.accuracy = 0
1959
+ >>> format_eng = EngFormatter(accuracy=0, use_eng_prefix=True)
1960
+ >>> format_eng(0)
1961
1961
' 0'
1962
-
1963
- >>> format_eng(1000000) # for self.accuracy = 1,
1964
- # self.use_eng_prefix = True
1962
+ >>> format_eng = EngFormatter(accuracy=1, use_eng_prefix=True)
1963
+ >>> format_eng(1_000_000)
1965
1964
' 1.0M'
1966
-
1967
- >>> format_eng("-1e-6") # for self.accuracy = 2
1968
- # self.use_eng_prefix = False
1965
+ >>> format_eng = EngFormatter(accuracy=2, use_eng_prefix=False)
1966
+ >>> format_eng("-1e-6")
1969
1967
'-1.00E-06'
1970
1968
1971
1969
@param num: the value to represent
You can’t perform that action at this time.
0 commit comments