Skip to content

Commit 019c337

Browse files
raffienficiaudpmhatre1
authored andcommitted
read_csv: adding "round_trip" to the "float_precision" accepted literal types (pandas-dev#56915)
1 parent 4207b61 commit 019c337

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/io/parsers/readers.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def read_csv(
676676
delim_whitespace: bool | lib.NoDefault = ...,
677677
low_memory: bool = ...,
678678
memory_map: bool = ...,
679-
float_precision: Literal["high", "legacy"] | None = ...,
679+
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
680680
storage_options: StorageOptions = ...,
681681
dtype_backend: DtypeBackend | lib.NoDefault = ...,
682682
) -> TextFileReader:
@@ -736,7 +736,7 @@ def read_csv(
736736
delim_whitespace: bool | lib.NoDefault = ...,
737737
low_memory: bool = ...,
738738
memory_map: bool = ...,
739-
float_precision: Literal["high", "legacy"] | None = ...,
739+
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
740740
storage_options: StorageOptions = ...,
741741
dtype_backend: DtypeBackend | lib.NoDefault = ...,
742742
) -> TextFileReader:
@@ -796,7 +796,7 @@ def read_csv(
796796
delim_whitespace: bool | lib.NoDefault = ...,
797797
low_memory: bool = ...,
798798
memory_map: bool = ...,
799-
float_precision: Literal["high", "legacy"] | None = ...,
799+
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
800800
storage_options: StorageOptions = ...,
801801
dtype_backend: DtypeBackend | lib.NoDefault = ...,
802802
) -> DataFrame:
@@ -856,7 +856,7 @@ def read_csv(
856856
delim_whitespace: bool | lib.NoDefault = ...,
857857
low_memory: bool = ...,
858858
memory_map: bool = ...,
859-
float_precision: Literal["high", "legacy"] | None = ...,
859+
float_precision: Literal["high", "legacy", "round_trip"] | None = ...,
860860
storage_options: StorageOptions = ...,
861861
dtype_backend: DtypeBackend | lib.NoDefault = ...,
862862
) -> DataFrame | TextFileReader:
@@ -934,7 +934,7 @@ def read_csv(
934934
delim_whitespace: bool | lib.NoDefault = lib.no_default,
935935
low_memory: bool = _c_parser_defaults["low_memory"],
936936
memory_map: bool = False,
937-
float_precision: Literal["high", "legacy"] | None = None,
937+
float_precision: Literal["high", "legacy", "round_trip"] | None = None,
938938
storage_options: StorageOptions | None = None,
939939
dtype_backend: DtypeBackend | lib.NoDefault = lib.no_default,
940940
) -> DataFrame | TextFileReader:

0 commit comments

Comments
 (0)