Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b7fcb54
CLN: remove unnecessary overriding in subclasses (#30875)
jbrockmendel Jan 10, 2020
6f2c509
DEPR: fix missing stacklevel in pandas.core.index deprecation (#30878)
jorisvandenbossche Jan 10, 2020
d1b9598
DOC: Encourage use of pre-commit in the docs (#30864)
gfyoung Jan 10, 2020
447a3b0
WEB: Removing Discourse links (#30890)
datapythonista Jan 10, 2020
03cdcb6
WEB: Remove from roadmap moving the docstring script (#30893)
datapythonista Jan 10, 2020
0b4bac7
TYP: typing annotations (#30901)
ShaharNaveh Jan 10, 2020
f887eb0
TYP: offsets (#30897)
jbrockmendel Jan 10, 2020
6e9651e
BUG: pickle files left behind by tm.round_trip_pickle (#30906)
jbrockmendel Jan 11, 2020
7f2948c
replace syntax with f-string (#30919)
HH-MWB Jan 11, 2020
939e7dd
CLN: F-strings (#30916)
dinasv Jan 11, 2020
b47a454
DOC: Fixture docs in pandas/conftest.py (#30917)
gfyoung Jan 11, 2020
75ecfa4
CLN: remove unnecesary _date_check_type (#30932)
jbrockmendel Jan 11, 2020
044559a
DOC: Fix SS03 docstring error (#30939)
galuhsahid Jan 12, 2020
28e909c
TYP: type up parts of series.py (#30761)
topper-123 Jan 12, 2020
4e2546d
STY: wrong placed space in strings (#30940)
ShaharNaveh Jan 12, 2020
45580a2
DOC: Fix whatsnew contributors section (#30926)
jschendel Jan 13, 2020
439d629
CI: numpydev changed double to single quote (#30952)
jbrockmendel Jan 13, 2020
46c2864
CLN: leftover ix checks (#30951)
jbrockmendel Jan 13, 2020
bbccf2d
DOC: Move import conventions from wiki to docs #30808 (#30888)
souvik3333 Jan 13, 2020
2c76d06
DOC: Move couple of deprecations whatsnew to correct section (#30961)
ryankarlos Jan 13, 2020
62d16ab
STY: concat strings that should not be seperated (#30942)
ShaharNaveh Jan 13, 2020
dd6e31a
REGR: Fixed hash_key=None for object values (#30900)
TomAugspurger Jan 13, 2020
bd63ece
CLN: remove no-op from indexing (#30934)
jbrockmendel Jan 13, 2020
7ba53f0
BUG: -1 to the power of pd.NA was returning -1 (#30960)
MarcoGorelli Jan 13, 2020
67fcdef
TYP: NDFrame.resample (#30947)
topper-123 Jan 13, 2020
993fdbe
DOC: whatsnew for 1.1 (#30972)
WillAyd Jan 13, 2020
6928327
CLN: misc cleanups (#30877)
jbrockmendel Jan 13, 2020
2bf0c9f
Compat for util.testing import (#30973)
TomAugspurger Jan 13, 2020
307137c
STY: concat strings (#30979)
ShaharNaveh Jan 13, 2020
2075539
Added small corrections to the test for interpolate limit_area (#30987)
cchwala Jan 13, 2020
8ff2ebd
STY: concat strings (#30991)
ShaharNaveh Jan 14, 2020
13b22fd
CLN: de-duplicate _getitem_scalar (#30992)
jbrockmendel Jan 14, 2020
0f048cb
CLN: remove geopandas compat code (#30909)
jbrockmendel Jan 14, 2020
b18024d
STY: Whitespaces placed at the beginning instead at the end of a line…
ShaharNaveh Jan 14, 2020
3471270
API: Disallow NaN in StringArray constructor (#30980)
TomAugspurger Jan 14, 2020
81d9636
BUG: ensure_datetime64ns with bigendian array (#30976)
jbrockmendel Jan 14, 2020
7d24b1c
docs: correct wrong result in pd.NA ** 0
tsvikas Jan 14, 2020
33d198d
Merge branch '1.0.x' into docs-na-pow
tsvikas Jan 14, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
replace syntax with f-string (#30919)
  • Loading branch information
HH-MWB authored and WillAyd committed Jan 11, 2020
commit 7f2948cad169c7b95e7a509145b66c1e599da2ba
4 changes: 2 additions & 2 deletions pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ def __arrow_array__(self, type=None):
if self.freqstr != type.freq:
raise TypeError(
"Not supported to convert PeriodArray to array with different"
" 'freq' ({0} vs {1})".format(self.freqstr, type.freq)
f" 'freq' ({self.freqstr} vs {type.freq})"
)
else:
raise TypeError(
"Not supported to convert PeriodArray to '{0}' type".format(type)
f"Not supported to convert PeriodArray to '{type}' type"
)

period_type = ArrowPeriodType(self.freqstr)
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,11 @@ def ensure_python_int(value: Union[int, np.integer]) -> int:
"""
if not is_scalar(value):
raise TypeError(f"Value needs to be a scalar value, was type {type(value)}")
msg = "Wrong type {} for value {}"
try:
new_value = int(value)
assert new_value == value
except (TypeError, ValueError, AssertionError):
raise TypeError(msg.format(type(value), value))
raise TypeError(f"Wrong type {type(value)} for value {value}")
return new_value


Expand Down
3 changes: 1 addition & 2 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,11 @@ def __eq__(self, other: Any) -> bool:
return hash(self) == hash(other)

def __repr__(self) -> str_type:
tpl = "CategoricalDtype(categories={data}ordered={ordered})"
if self.categories is None:
data = "None, "
else:
data = self.categories._format_data(name=type(self).__name__)
return tpl.format(data=data, ordered=self.ordered)
return f"CategoricalDtype(categories={data}ordered={self.ordered})"

@staticmethod
def _hash_categories(categories, ordered: Ordered = True) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2431,7 +2431,7 @@ def _verbose_repr():
dtype = self.dtypes.iloc[i]
col = pprint_thing(col)

line_no = _put_str(" {num}".format(num=i), space_num)
line_no = _put_str(f" {i}", space_num)
count = ""
if show_counts:
count = counts.iloc[i]
Expand Down