File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ Conversion
390
390
DatetimeIndex.to_pydatetime
391
391
DatetimeIndex.to_series
392
392
DatetimeIndex.to_frame
393
+ DatetimeIndex.to_julian_date
393
394
394
395
Methods
395
396
~~~~~~~
Original file line number Diff line number Diff line change @@ -2254,9 +2254,26 @@ def isocalendar(self) -> DataFrame:
2254
2254
2255
2255
def to_julian_date (self ) -> npt .NDArray [np .float64 ]:
2256
2256
"""
2257
- Convert Datetime Array to float64 ndarray of Julian Dates.
2258
- 0 Julian date is noon January 1, 4713 BC.
2257
+ Convert TimeStamp to a Julian Date.
2258
+
2259
+ This method returns the number of days as a float since noon January 1, 4713 BC.
2260
+
2259
2261
https://en.wikipedia.org/wiki/Julian_day
2262
+
2263
+ Returns
2264
+ -------
2265
+ ndarray or Index
2266
+ Float values that represent each date in Julian Calendar.
2267
+
2268
+ See Also
2269
+ --------
2270
+ Timestamp.to_julian_date : Equivalent method on ``Timestamp`` objects.
2271
+
2272
+ Examples
2273
+ --------
2274
+ >>> idx = pd.DatetimeIndex(["2028-08-12 00:54", "2028-08-12 02:06"])
2275
+ >>> idx.to_julian_date()
2276
+ Index([2461995.5375, 2461995.5875], dtype='float64')
2260
2277
"""
2261
2278
2262
2279
# http://mysite.verizon.net/aesir_research/date/jdalg2.htm
Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ class DatetimeIndex(DatetimeTimedeltaMixin):
222
222
to_pydatetime
223
223
to_series
224
224
to_frame
225
+ to_julian_date
225
226
month_name
226
227
day_name
227
228
mean
You can’t perform that action at this time.
0 commit comments