Skip to content

Commit

Permalink
Revert to datetime64[ms]
Browse files Browse the repository at this point in the history
  • Loading branch information
alifbe committed Nov 15, 2023
1 parent 663daa0 commit ac506e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ecl2df/wellcompletiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _df2pyarrow(dframe: pd.DataFrame) -> pyarrow.Table:
else:
field_metadata = {}
if colname == "DATE":
dtype = pyarrow.timestamp("ns")
dtype = pyarrow.timestamp("ms")
elif pd.api.types.is_integer_dtype(dframe.dtypes[colname]):
dtype = pyarrow.int32()
elif pd.api.types.is_string_dtype(dframe.dtypes[colname]):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wellcompletiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_df2pyarrow():
eclfiles, zonemap=EIGHTCELLS_ZONEMAP, use_wellconnstatus=False
)
df["KH"] = df["KH"].astype(np.int32)
pd.testing.assert_frame_equal(df, _df2pyarrow(df).to_pandas(), check_like=True)
pd.testing.assert_frame_equal(df, _df2pyarrow(df).to_pandas(), check_like=True, check_dtype=False)


def test_metadata():
Expand Down

0 comments on commit ac506e7

Please sign in to comment.