Skip to content

Commit 48c3250

Browse files
Changed the default time format from datetime64[s] to datetime64[ns].
Some testing was done and a bug was filed, HDF5Store doesn't save or loads `datetime64[s]` right so it was changed to [ns] which is the format Pandas chooses when transforming to datetime. See the link for the bug: pandas-dev/pandas#59004 .
1 parent a69a294 commit 48c3250

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/simple_portfolio_ledger/src/simple_portfolio_ledger.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ def ledger(
249249
pd
250250
# Join DataFrames
251251
.concat(dfs_toconcat, join='inner', axis=1)
252-
# Convert dates to datetime64[s]
252+
# Convert dates to appropriate format
253253
.astype(
254254
{
255-
'date_execution': 'datetime64[s]',
256-
'date_order': 'datetime64[s]',
255+
'date_execution': 'datetime64[ns]',
256+
'date_order': 'datetime64[ns]',
257257
}
258258
)
259259
# Try to pass colums where dtype is object to a type like int64 or float64

0 commit comments

Comments
 (0)