Skip to content

Commit 4164a87

Browse files
committed
removed full orient strings to return warning"
1 parent fb7de33 commit 4164a87

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pandas/core/frame.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,14 @@ def to_dict(self, orient="dict", into=dict):
14011401
into_c = com.standardize_mapping(into)
14021402
orient = orient.lower()
14031403
# GH32515
1404-
if orient not in {"dict", "list", "series", "split", "records", "index"}:
1404+
if orient.startswith(("d", "l", "s", "r", "i")) and orient not in {
1405+
"dict",
1406+
"list",
1407+
"series",
1408+
"split",
1409+
"records",
1410+
"index",
1411+
}:
14051412
warnings.warn(
14061413
"Using short name for 'orient' is deprecated. Only the "
14071414
"options: ('dict', list, 'series', 'split', 'records', 'index') "

0 commit comments

Comments
 (0)