Comments (3)
@sfc-gh-mvashishtha are you sure?
>>> import pandas as pd
>>> pd.Series.dt.to_timestamp
<function PandasDelegate._add_delegate_accessors.<locals>._create_delegator_method.<locals>.f at 0x00000242B5964430>
>>> pd.__version__
'2.2.2'
>>>
from modin.
This might be a docs issue, I don't see it in the sidebar of official pandas docs (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.time.html is valid, but https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.to_timestamp.html is not).
from modin.
Series.dt.to_timestamp() is a valid method for PeriodProperties, but not for DatetimeProperties, TimedeltaProperties. For example, following is valid:
>>> seconds_series = pd.Series(pd.period_range(start="2000-01-01 00:00:00", end="2000-01-01 00:00:03", freq="s"))
>>> seconds_series
0 2000-01-01 00:00:00
1 2000-01-01 00:00:01
2 2000-01-01 00:00:02
3 2000-01-01 00:00:03
dtype: period[s]
>>> seconds_series.dt.to_timestamp()
0 2000-01-01 00:00:00
1 2000-01-01 00:00:01
2 2000-01-01 00:00:02
3 2000-01-01 00:00:03
dtype: datetime64[ns]
However, it is invalid for timedelta:
>>> seconds_series = pd.Series(pd.timedelta_range(start="1 second", periods=3, freq="s"))
>>> seconds_series.dt.to_timestamp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'TimedeltaProperties' object has no attribute 'to_timestamp'
>>> seconds_series
0 0 days 00:00:01
1 0 days 00:00:02
2 0 days 00:00:03
dtype: timedelta64[ns]
This might be a problem for both doc and implementation.
from modin.
Related Issues (20)
- how to take down ray and put up again in local mode HOT 5
- Left `merge` failed with message: `ValueError: Length mismatch: Expected axis has 36 elements, new values have 32 elements`
- Add type hints for `base.py`
- Support right merge/join
- Update docs as to from_* functions
- Use `extract_dtype` function in more places
- Empty docstrings should not be inherited
- Automatic publication of Modin wheel to PyPI
- Using decorators makes the profile confusing with a lot of circular dependencies.
- Remove `instance_type` attribute of axis partitions
- Remove HDK engine
- Remove deprecated functions from `utils.py`, `accessor.py` and `io.py`
- BUG: AttributeError: 'bool' object has no attribute 'all'
- Remove Cudf storage format as unmaintained
- `enable_logging` decorator does not preserve decorated function type hints
- Using a custom pandas accessor with Modin HOT 2
- Installation of modin using pip fails HOT 4
- Introduce MinRowPartitionSize and MinColumnPartitionSize to make partitioning more flexible
- Remove deprecated configs
- Update Modin on Dask documentation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modin.