question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FutureWarning: casting datetime64[ns] values to int64 with .astype(...) is deprecated

See original GitHub issue

ALL 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:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
jorisvandenbosschecommented, Jan 21, 2022

FYI, the deprecation warning has been reverted

1reaction
Hoxbrocommented, Nov 22, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found