Skip to content

Commit f648779

Browse files
committed
fix pre-commit.ci err
1 parent e327f0f commit f648779

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ cdef class _Timestamp(ABCTimestamp):
833833
See Also
834834
--------
835835
pandas.Timestamp.day_name : Returns the name of the day of the week.
836-
pandas.Timestamp.strftime : Returns a formatted string representation of the Timestamp.
837-
datetime.datetime.strftime : Returns a string representing the date and time, controlled by an explicit format string.
836+
pandas.Timestamp.strftime : Returns a formatted string of the Timestamp.
837+
datetime.datetime.strftime : Returns a string representing the date and time.
838838

839839
Examples
840840
--------
@@ -928,7 +928,7 @@ cdef class _Timestamp(ABCTimestamp):
928928
"""
929929
Return the quarter of the year for the `Timestamp`.
930930

931-
This property returns an integer representing the quarter of the year in
931+
This property returns an integer representing the quarter of the year in
932932
which the `Timestamp` falls. The quarters are defined as follows:
933933
- Q1: January 1 to March 31
934934
- Q2: April 1 to June 30
@@ -944,8 +944,8 @@ cdef class _Timestamp(ABCTimestamp):
944944
--------
945945
pandas.Timestamp.month : Returns the month of the `Timestamp`.
946946
pandas.Timestamp.year : Returns the year of the `Timestamp`.
947-
pandas.Timestamp.is_quarter_end : Boolean property indicating if the `Timestamp` is at the end of a quarter.
948-
pandas.Timestamp.is_quarter_start : Boolean property indicating if the `Timestamp` is at the start of a quarter.
947+
pandas.Timestamp.is_quarter_end : Returns if `Timestamp` is at the quarter's end.
948+
pandas.Timestamp.is_quarter_start : Indicates if `Timestamp` is at the quarter's start.
949949

950950
Examples
951951
--------
@@ -1025,9 +1025,9 @@ cdef class _Timestamp(ABCTimestamp):
10251025

10261026
See Also
10271027
--------
1028-
pandas.Timestamp.floor : Round down the `Timestamp` to the nearest specified frequency.
1029-
pandas.Timestamp.ceil : Round up the `Timestamp` to the nearest specified frequency.
1030-
pandas.Timestamp.round : Round the `Timestamp` to the nearest specified frequency.
1028+
pandas.Timestamp.floor : Rounds `Timestamp` down to the nearest frequency.
1029+
pandas.Timestamp.ceil : Rounds `Timestamp` up to the nearest frequency.
1030+
pandas.Timestamp.round : Rounds `Timestamp` to the nearest frequency.
10311031

10321032
Examples
10331033
--------
@@ -1279,7 +1279,7 @@ cdef class _Timestamp(ABCTimestamp):
12791279
pandas.Timestamp.fromtimestamp : Construct a `Timestamp` from a POSIX timestamp.
12801280
datetime.datetime.timestamp : Equivalent method from the `datetime` module.
12811281
pandas.Timestamp.to_pydatetime : Convert the `Timestamp` to a `datetime` object.
1282-
pandas.Timestamp.to_datetime64 : Convert the `Timestamp` to a `numpy.datetime64` object.
1282+
pandas.Timestamp.to_datetime64 : Converts `Timestamp` to `numpy.datetime64`.
12831283

12841284
Examples
12851285
--------
@@ -1370,10 +1370,10 @@ cdef class _Timestamp(ABCTimestamp):
13701370
Parameters
13711371
----------
13721372
dtype : dtype, optional
1373-
Data type of the output, ignored in this method as the return type
1373+
Data type of the output, ignored in this method as the return type
13741374
is always `numpy.datetime64`.
13751375
copy : bool, default False
1376-
Whether to ensure that the returned value is a new object. This
1376+
Whether to ensure that the returned value is a new object. This
13771377
parameter is also ignored as the method does not support copying.
13781378

13791379
Returns
@@ -1412,9 +1412,7 @@ cdef class _Timestamp(ABCTimestamp):
14121412
Parameters
14131413
----------
14141414
freq : str, optional
1415-
The frequency string representing the desired period (e.g., 'Y' for yearly,
1416-
'M' for monthly, 'W' for weekly, etc.). If not provided, the default is `None`,
1417-
which will infer the frequency.
1415+
Frequency string for the period (e.g., 'Y', 'M', 'W'). Defaults to `None`.
14181416

14191417
See Also
14201418
--------
@@ -1649,7 +1647,7 @@ class Timestamp(_Timestamp):
16491647
See Also
16501648
--------
16511649
datetime.datetime.today : Returns the current local date.
1652-
pandas.Timestamp.now : Returns the current time with an option to specify timezone.
1650+
pandas.Timestamp.now : Returns current time with optional timezone.
16531651
pandas.Timestamp : A class representing a specific timestamp.
16541652

16551653
Examples
@@ -1746,17 +1744,17 @@ class Timestamp(_Timestamp):
17461744
"""
17471745
Create a `Timestamp` object from a POSIX timestamp.
17481746

1749-
This method converts a POSIX timestamp (the number of seconds since
1750-
January 1, 1970, 00:00:00 UTC) into a `Timestamp` object. The resulting
1747+
This method converts a POSIX timestamp (the number of seconds since
1748+
January 1, 1970, 00:00:00 UTC) into a `Timestamp` object. The resulting
17511749
`Timestamp` can be localized to a specific time zone if provided.
17521750

17531751
Parameters
17541752
----------
17551753
ts : float
1756-
The POSIX timestamp to convert, representing seconds since
1754+
The POSIX timestamp to convert, representing seconds since
17571755
the epoch (1970-01-01 00:00:00 UTC).
1758-
tz : str, zoneinfo.ZoneInfo, pytz.timezone, dateutil.tz.tzfile, or None, optional
1759-
Time zone for the `Timestamp`. If not provided, the `Timestamp` will
1756+
tz : str, zoneinfo.ZoneInfo, pytz.timezone, dateutil.tz.tzfile, optional
1757+
Time zone for the `Timestamp`. If not provided, the `Timestamp` will
17601758
be timezone-naive (i.e., without time zone information).
17611759

17621760
Returns
@@ -1768,7 +1766,7 @@ class Timestamp(_Timestamp):
17681766
--------
17691767
pandas.Timestamp : Represents a single timestamp, similar to `datetime`.
17701768
pandas.to_datetime : Converts various types of data to datetime.
1771-
datetime.datetime.fromtimestamp : Returns a datetime object from a POSIX timestamp.
1769+
datetime.datetime.fromtimestamp : Returns a datetime from a POSIX timestamp.
17721770

17731771
Examples
17741772
--------
@@ -1866,7 +1864,7 @@ class Timestamp(_Timestamp):
18661864
18671865
def date(self):
18681866
"""
1869-
Return a `datetime.date` object with the same year, month, and day as the Timestamp.
1867+
Returns `datetime.date` with the same year, month, and day.
18701868

18711869
This method extracts the date component from the `Timestamp` and returns
18721870
it as a `datetime.date` object, discarding the time information.
@@ -2064,13 +2062,13 @@ class Timestamp(_Timestamp):
20642062

20652063
This method converts the `Timestamp` into a time tuple, which is compatible
20662064
with functions like `time.localtime()`. The time tuple is a named tuple with
2067-
attributes such as year, month, day, hour, minute, second, weekday, day of the year,
2068-
and daylight savings indicator.
2065+
attributes such as year, month, day, hour, minute, second, weekday,
2066+
day of the year, and daylight savings indicator.
20692067

20702068
See Also
20712069
--------
20722070
time.localtime : Converts a POSIX timestamp into a time tuple.
2073-
pandas.Timestamp : The `Timestamp` object that represents a specific point in time.
2071+
pandas.Timestamp : The `Timestamp` that represents a specific point in time.
20742072
datetime.datetime.timetuple : Equivalent method in the `datetime` module.
20752073

20762074
Examples
@@ -2119,7 +2117,7 @@ class Timestamp(_Timestamp):
21192117
See Also
21202118
--------
21212119
datetime.datetime.toordinal : Equivalent method in the `datetime` module.
2122-
pandas.Timestamp : The `Timestamp` object that represents a specific point in time.
2120+
pandas.Timestamp : The `Timestamp` that represents a specific point in time.
21232121
pandas.Timestamp.fromordinal : Create a `Timestamp` from an ordinal.
21242122

21252123
Examples

0 commit comments

Comments
 (0)