Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit156559d

Browse files
authored
Merge branch 'main' into merge-docs-changes-to-main
2 parents037956a +a6ee27c commit156559d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to[Semantic Versioning](http://semver.org/).
44

5+
##[6.0.1] - 2025-02-16
6+
7+
###Fixed
8+
- Fix`TypeError` when using`orjson` to serialize`pandas.NA`.
9+
510
##[6.0.0] - 2025-01-28
611

712
###Added

‎plotly/io/_json.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def clean_to_json_compatible(obj, **kwargs):
529529

530530
# pandas
531531
ifpdisnotNone:
532-
ifobjispd.NaT:
532+
ifobjispd.NaTorobjispd.NA:
533533
returnNone
534534
elifisinstance(obj, (pd.Series,pd.DatetimeIndex)):
535535
ifnumpy_allowedandobj.dtype.kindin ("b","i","u","f"):

‎tests/test_io/test_to_from_plotly_json.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,9 @@ def test_sanitize_json(engine):
260260
forbad,goodinreplacements.items():
261261
assertbadnotinfig_json
262262
assertgoodinfig_json
263+
264+
265+
@pytest.mark.parametrize("na_value", [np.nan,pd.NaT,pd.NA])
266+
deftest_na_values(engine,na_value):
267+
result=pio.to_json_plotly(na_value,engine=engine)
268+
assertresult=="null"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp