Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Orange/widgets/data/owcsvimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,11 +1532,6 @@ def expand(ranges):
numbers_format_kwds["thousands"] = opts.group_separator

if numbers_format_kwds:
# float_precision = "round_trip" cannot handle non c-locale decimal and
# thousands sep (https://github.com/pandas-dev/pandas/issues/35365).
# Fallback to 'high'.
numbers_format_kwds["float_precision"] = "high"
else:
numbers_format_kwds["float_precision"] = "round_trip"

with ExitStack() as stack:
Expand All @@ -1559,7 +1554,12 @@ def expand(ranges):
na_values=na_values, keep_default_na=False,
**numbers_format_kwds
)

if parse_dates:
for date_col in parse_dates:
if df.dtypes[date_col] == "object":
df[df.columns[date_col]] = pd.to_datetime(
df.iloc[:, date_col], errors="coerce"
)
if prefix:
df.columns = [f"{prefix}{column}" for column in df.columns]

Expand Down