Skip to content

Commit 73fae2b

Browse files
Merge pull request #585 from laughingman7743/#532
Fix incompatible dtype conversions in dataframe. (fix #532)
2 parents ea1eeb1 + 731db63 commit 73fae2b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pyathena/pandas/result_set.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ def _trunc_date(self, df: "DataFrame") -> "DataFrame":
206206
description = self.description if self.description else []
207207
times = [d[0] for d in description if d[1] in ("time", "time with time zone")]
208208
if times:
209-
df.loc[:, times] = df.loc[:, times].apply(lambda r: r.dt.time)
209+
truncated = df.loc[:, times].apply(lambda r: r.dt.time)
210+
for time in times:
211+
df.isetitem(df.columns.get_loc(time), truncated[time])
210212
return df
211213

212214
def fetchone(

0 commit comments

Comments
 (0)