Skip to content

Commit 7e461a1

Browse files
remove \n from docstring
1 parent 08395af commit 7e461a1

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

pandas/core/arrays/datetimes.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def f(self):
8282
return result
8383

8484
f.__name__ = name
85-
f.__doc__ = docstring
85+
f.__doc__ = "\n{}\n".format(docstring)
8686
return property(f)
8787

8888

@@ -1072,19 +1072,19 @@ def date(self):
10721072

10731073
return tslib.ints_to_pydatetime(timestamps, box="date")
10741074

1075-
year = _field_accessor('year', 'Y', "\n The year of the datetime\n")
1075+
year = _field_accessor('year', 'Y', "The year of the datetime")
10761076
month = _field_accessor('month', 'M',
1077-
"\n The month as January=1, December=12 \n")
1078-
day = _field_accessor('day', 'D', "\nThe days of the datetime\n")
1079-
hour = _field_accessor('hour', 'h', "\nThe hours of the datetime\n")
1080-
minute = _field_accessor('minute', 'm', "\nThe minutes of the datetime\n")
1081-
second = _field_accessor('second', 's', "\nThe seconds of the datetime\n")
1077+
"The month as January=1, December=12")
1078+
day = _field_accessor('day', 'D', "The days of the datetime")
1079+
hour = _field_accessor('hour', 'h', "The hours of the datetime")
1080+
minute = _field_accessor('minute', 'm', "The minutes of the datetime")
1081+
second = _field_accessor('second', 's', "The seconds of the datetime")
10821082
microsecond = _field_accessor('microsecond', 'us',
1083-
"\nThe microseconds of the datetime\n")
1083+
"The microseconds of the datetime")
10841084
nanosecond = _field_accessor('nanosecond', 'ns',
1085-
"\nThe nanoseconds of the datetime\n")
1085+
"The nanoseconds of the datetime")
10861086
weekofyear = _field_accessor('weekofyear', 'woy',
1087-
"\nThe week ordinal of the year\n")
1087+
"The week ordinal of the year")
10881088
week = weekofyear
10891089
_dayofweek_doc = """
10901090
The day of the week with Monday=0, Sunday=6.
@@ -1129,12 +1129,12 @@ def date(self):
11291129
"The name of day in a week (ex: Friday)\n\n.. deprecated:: 0.23.0")
11301130

11311131
dayofyear = _field_accessor('dayofyear', 'doy',
1132-
"\nThe ordinal day of the year\n")
1133-
quarter = _field_accessor('quarter', 'q', "\nThe quarter of the date\n")
1132+
"The ordinal day of the year")
1133+
quarter = _field_accessor('quarter', 'q', "The quarter of the date")
11341134
days_in_month = _field_accessor(
11351135
'days_in_month',
11361136
'dim',
1137-
"\nThe number of days in the month\n")
1137+
"The number of days in the month")
11381138
daysinmonth = days_in_month
11391139
_is_month_doc = """
11401140
Indicates whether the date is the {first_or_last} day of the month.

pandas/core/arrays/timedeltas.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def f(self):
5959
return result
6060

6161
f.__name__ = name
62-
f.__doc__ = docstring
62+
f.__doc__ = "\n{}\n".format(docstring)
6363
return property(f)
6464

6565

@@ -684,16 +684,16 @@ def to_pytimedelta(self):
684684
return tslibs.ints_to_pytimedelta(self.asi8)
685685

686686
days = _field_accessor("days", "days",
687-
"\nNumber of days for each element.\n")
687+
"Number of days for each element.")
688688
seconds = _field_accessor("seconds", "seconds",
689-
"\nNumber of seconds (>= 0 and less than 1 day) "
690-
"for each element.\n")
689+
"Number of seconds (>= 0 and less than 1 day) "
690+
"for each element.")
691691
microseconds = _field_accessor("microseconds", "microseconds",
692-
"\nNumber of microseconds (>= 0 and less "
693-
"than 1 second) for each element.\n")
692+
"Number of microseconds (>= 0 and less "
693+
"than 1 second) for each element.")
694694
nanoseconds = _field_accessor("nanoseconds", "nanoseconds",
695-
"\nNumber of nanoseconds (>= 0 and less "
696-
"than 1 microsecond) for each element.\n")
695+
"Number of nanoseconds (>= 0 and less "
696+
"than 1 microsecond) for each element.")
697697

698698
@property
699699
def components(self):

0 commit comments

Comments
 (0)