FutureWarning: casting datetime64[ns] values to int64 with .astype(...) is deprecated
See original GitHub issueALL software version info
numpy.__version__ = '1.20.3'
holoviews.__version__ = '1.14.6'
Description of expected behavior and the observed behavior
Casting datetime64[ns] values to int64 with .astype(…) is deprecated
Complete, minimal, self-contained example code that reproduces the issue
import hvplot.pandas # noqa
import pandas as pd
df = pd.DataFrame({
"time": pd.date_range("2020", "2021" ,100),
"data": 100 * [1],
})
df.hvplot.line("time", "data", datashade=True)
Stack traceback and/or browser JavaScript console output
C:\Users\shh\miniconda3\envs\clean_holoviz\lib\site-packages\holoviews\operation\datashader.py:428: FutureWarning: casting datetime64[ns] values to int64 with .astype(...) is deprecated and will raise in a future version. Use .view(...) instead.
df[d.name] = vals.astype('int64')
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
pandas FutureWarning when casting type in DatetimeIndex
A new FutureWarning warning is being issued from pandas from ... FutureWarning: casting datetime64[ns] values to int64 with .astype(.
Read more >Python numpy: cannot convert datetime64[ns ... - Stack Overflow
Series.astype converts all date-like objects to datetime64[ns] . To convert to datetime64[D] , use values to obtain a NumPy array before ...
Read more >What's new in 1.3.0 (July 2, 2021) - Pandas
Using .astype to convert between datetime64[ns] dtype and DatetimeTZDtype is deprecated and will raise in a future version, use obj.tz_localize or ...
Read more >Transforming 1m data From Binance - Kaggle
Time # Log Message
12.4s 2 from pyarrow import HadoopFileSystem
59.3s 18 FutureWarning,
59.3s 19 Converting notebook __notebook__.ipynb to notebook
Read more >Documentation about type conversion between RapidMiner ...
FutureWarning : casting datetime64[ns, UTC] values to int64 with .astype(...) is deprecated and will raise in a future version. Use .view(.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, the deprecation warning has been reverted
The warning was added here: https://github.com/pandas-dev/pandas/pull/38544