neulab/docprompting-conala huggingface dataset:
pandas.MultiIndex.get_loc   MultiIndex.get_loc(key, method=None)[source]
 
Get location for a label or a tuple of labels. The location is returned as an integer/slice or boolean mask.  Parameters 
 
key:label or tuple of labels (one for each level)


method:None

  Returns 
 
loc:int, slice object or boolean mask


If the key is past the lexsort depth, the return may be a boolean mask array, otherwise it is always a slice or int.      See also  Index.get_loc

The get_loc method for (single-level) index.  MultiIndex.slice_locs

Get slice location given start label(s) and end label(s).  MultiIndex.get_locs

Get location for a label/slice/list/mask or a sequence of such.    Notes The key cannot be a slice, list of same-level labels, a boolean mask, or a sequence of such. If you want to use those, use MultiIndex.get_locs() instead. Examples 
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')])
  
>>> mi.get_loc('b')
slice(1, 3, None)
  
>>> mi.get_loc(('b', 'e'))
1
pandas.MultiIndex.get_loc_level   MultiIndex.get_loc_level(key, level=0, drop_level=True)[source]
 
Get location and sliced index for requested label(s)/level(s).  Parameters 
 
key:label or sequence of labels


level:int/level name or list thereof, optional


drop_level:bool, default True


If False, the resulting index will not drop any level.    Returns 
 
loc:A 2-tuple where the elements are:


Element 0: int, slice object or boolean array Element 1: The resulting sliced multiindex/index. If the key contains all levels, this will be None.      See also  MultiIndex.get_loc

Get location for a label or a tuple of labels.  MultiIndex.get_locs

Get location for a label/slice/list/mask or a sequence of such.    Examples 
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')],
...                                names=['A', 'B'])
  
>>> mi.get_loc_level('b')
(slice(1, 3, None), Index(['e', 'f'], dtype='object', name='B'))
  
>>> mi.get_loc_level('e', level='B')
(array([False,  True, False]), Index(['b'], dtype='object', name='A'))
  
>>> mi.get_loc_level(['b', 'e'])
(1, None)
pandas.MultiIndex.get_locs   MultiIndex.get_locs(seq)[source]
 
Get location for a sequence of labels.  Parameters 
 
seq:label, slice, list, mask or a sequence of such


You should use one of the above for each level. If a level should not be used, set it to slice(None).    Returns 
 numpy.ndarray

NumPy array of integers suitable for passing to iloc.      See also  MultiIndex.get_loc

Get location for a label or a tuple of labels.  MultiIndex.slice_locs

Get slice location given start label(s) and end label(s).    Examples 
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')])
  
>>> mi.get_locs('b')  
array([1, 2], dtype=int64)
  
>>> mi.get_locs([slice(None), ['e', 'f']])  
array([1, 2], dtype=int64)
  
>>> mi.get_locs([[True, False, True], slice('e', 'f')])  
array([2], dtype=int64)
pandas.MultiIndex.levshape   propertyMultiIndex.levshape
 
A tuple with the length of each level. Examples 
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b'], ['c']])
>>> mi
MultiIndex([('a', 'b', 'c')],
           )
>>> mi.levshape
(1, 1, 1)
pandas.MultiIndex.names   propertyMultiIndex.names
 
Names of levels in MultiIndex. Examples 
>>> mi = pd.MultiIndex.from_arrays(
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z'])
>>> mi
MultiIndex([(1, 3, 5),
            (2, 4, 6)],
           names=['x', 'y', 'z'])
>>> mi.names
FrozenList(['x', 'y', 'z'])
pandas.MultiIndex.nlevels   propertyMultiIndex.nlevels
 
Integer number of levels in this MultiIndex. Examples 
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b'], ['c']])
>>> mi
MultiIndex([('a', 'b', 'c')],
           )
>>> mi.nlevels
3
pandas.MultiIndex.remove_unused_levels   MultiIndex.remove_unused_levels()[source]
 
Create new MultiIndex from current that removes unused levels. Unused level(s) means levels that are not expressed in the labels. The resulting MultiIndex will have the same outward appearance, meaning the same .values and ordering. It will also be .equals() to the original.  Returns 
 MultiIndex
   Examples 
>>> mi = pd.MultiIndex.from_product([range(2), list('ab')])
>>> mi
MultiIndex([(0, 'a'),
            (0, 'b'),
            (1, 'a'),
            (1, 'b')],
           )
  
>>> mi[2:]
MultiIndex([(1, 'a'),
            (1, 'b')],
           )
  The 0 from the first level is not represented and can be removed 
>>> mi2 = mi[2:].remove_unused_levels()
>>> mi2.levels
FrozenList([[1], ['a', 'b']])
pandas.MultiIndex.reorder_levels   MultiIndex.reorder_levels(order)[source]
 
Rearrange levels using input order. May not drop or duplicate levels.  Parameters 
 
order:list of int or list of str


List representing new level order. Reference level by number (position) or by key (label).    Returns 
 MultiIndex
   Examples 
>>> mi = pd.MultiIndex.from_arrays([[1, 2], [3, 4]], names=['x', 'y'])
>>> mi
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])
  
>>> mi.reorder_levels(order=[1, 0])
MultiIndex([(3, 1),
            (4, 2)],
           names=['y', 'x'])
  
>>> mi.reorder_levels(order=['y', 'x'])
MultiIndex([(3, 1),
            (4, 2)],
           names=['y', 'x'])
pandas.MultiIndex.set_codes   MultiIndex.set_codes(codes, level=None, inplace=None, verify_integrity=True)[source]
 
Set new codes on MultiIndex. Defaults to returning new index.  Parameters 
 
codes:sequence or list of sequence


New codes to apply.  
level:int, level name, or sequence of int/level names (default None)


Level(s) to set (None for all levels).  
inplace:bool


If True, mutates in place.  Deprecated since version 1.2.0.   
verify_integrity:bool, default True


If True, checks that levels and codes are compatible.    Returns 
 new index (of same type and class…etc) or None

The same type as the caller or None if inplace=True.     Examples 
>>> idx = pd.MultiIndex.from_tuples(
...     [(1, "one"), (1, "two"), (2, "one"), (2, "two")], names=["foo", "bar"]
... )
>>> idx
MultiIndex([(1, 'one'),
    (1, 'two'),
    (2, 'one'),
    (2, 'two')],
   names=['foo', 'bar'])
  
>>> idx.set_codes([[1, 0, 1, 0], [0, 0, 1, 1]])
MultiIndex([(2, 'one'),
            (1, 'one'),
            (2, 'two'),
            (1, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([1, 0, 1, 0], level=0)
MultiIndex([(2, 'one'),
            (1, 'two'),
            (2, 'one'),
            (1, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([0, 0, 1, 1], level='bar')
MultiIndex([(1, 'one'),
            (1, 'one'),
            (2, 'two'),
            (2, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([[1, 0, 1, 0], [0, 0, 1, 1]], level=[0, 1])
MultiIndex([(2, 'one'),
            (1, 'one'),
            (2, 'two'),
            (1, 'two')],
           names=['foo', 'bar'])
pandas.MultiIndex.set_levels   MultiIndex.set_levels(levels, level=None, inplace=None, verify_integrity=True)[source]
 
Set new levels on MultiIndex. Defaults to returning new index.  Parameters 
 
levels:sequence or list of sequence


New level(s) to apply.  
level:int, level name, or sequence of int/level names (default None)


Level(s) to set (None for all levels).  
inplace:bool


If True, mutates in place.  Deprecated since version 1.2.0.   
verify_integrity:bool, default True


If True, checks that levels and codes are compatible.    Returns 
 new index (of same type and class…etc) or None

The same type as the caller or None if inplace=True.     Examples 
>>> idx = pd.MultiIndex.from_tuples(
...     [
...         (1, "one"),
...         (1, "two"),
...         (2, "one"),
...         (2, "two"),
...         (3, "one"),
...         (3, "two")
...     ],
...     names=["foo", "bar"]
... )
>>> idx
MultiIndex([(1, 'one'),
    (1, 'two'),
    (2, 'one'),
    (2, 'two'),
    (3, 'one'),
    (3, 'two')],
   names=['foo', 'bar'])
  
>>> idx.set_levels([['a', 'b', 'c'], [1, 2]])
MultiIndex([('a', 1),
            ('a', 2),
            ('b', 1),
            ('b', 2),
            ('c', 1),
            ('c', 2)],
           names=['foo', 'bar'])
>>> idx.set_levels(['a', 'b', 'c'], level=0)
MultiIndex([('a', 'one'),
            ('a', 'two'),
            ('b', 'one'),
            ('b', 'two'),
            ('c', 'one'),
            ('c', 'two')],
           names=['foo', 'bar'])
>>> idx.set_levels(['a', 'b'], level='bar')
MultiIndex([(1, 'a'),
            (1, 'b'),
            (2, 'a'),
            (2, 'b'),
            (3, 'a'),
            (3, 'b')],
           names=['foo', 'bar'])
  If any of the levels passed to set_levels() exceeds the existing length, all of the values from that argument will be stored in the MultiIndex levels, though the values will be truncated in the MultiIndex output. 
>>> idx.set_levels([['a', 'b', 'c'], [1, 2, 3, 4]], level=[0, 1])
MultiIndex([('a', 1),
    ('a', 2),
    ('b', 1),
    ('b', 2),
    ('c', 1),
    ('c', 2)],
   names=['foo', 'bar'])
>>> idx.set_levels([['a', 'b', 'c'], [1, 2, 3, 4]], level=[0, 1]).levels
FrozenList([['a', 'b', 'c'], [1, 2, 3, 4]])
pandas.MultiIndex.sortlevel   MultiIndex.sortlevel(level=0, ascending=True, sort_remaining=True)[source]
 
Sort MultiIndex at the requested level. The result will respect the original ordering of the associated factor at that level.  Parameters 
 
level:list-like, int or str, default 0


If a string is given, must be a name of the level. If list-like must be names or ints of levels.  
ascending:bool, default True


False to sort in descending order. Can also be a list to specify a directed ordering.  
sort_remaining:sort by the remaining levels after level

  Returns 
 
sorted_index:pd.MultiIndex


Resulting index.  
indexer:np.ndarray[np.intp]


Indices of output values in original index.     Examples 
>>> mi = pd.MultiIndex.from_arrays([[0, 0], [2, 1]])
>>> mi
MultiIndex([(0, 2),
            (0, 1)],
           )
  
>>> mi.sortlevel()
(MultiIndex([(0, 1),
            (0, 2)],
           ), array([1, 0]))
  
>>> mi.sortlevel(sort_remaining=False)
(MultiIndex([(0, 2),
            (0, 1)],
           ), array([0, 1]))
  
>>> mi.sortlevel(1)
(MultiIndex([(0, 1),
            (0, 2)],
           ), array([1, 0]))
  
>>> mi.sortlevel(1, ascending=False)
(MultiIndex([(0, 2),
            (0, 1)],
           ), array([0, 1]))
pandas.MultiIndex.swaplevel   MultiIndex.swaplevel(i=- 2, j=- 1)[source]
 
Swap level i with level j. Calling this method does not change the ordering of the values.  Parameters 
 
i:int, str, default -2


First level of index to be swapped. Can pass level name as string. Type of parameters can be mixed.  
j:int, str, default -1


Second level of index to be swapped. Can pass level name as string. Type of parameters can be mixed.    Returns 
 MultiIndex

A new MultiIndex.      See also  Series.swaplevel

Swap levels i and j in a MultiIndex.  Dataframe.swaplevel

Swap levels i and j in a MultiIndex on a particular axis.    Examples 
>>> mi = pd.MultiIndex(levels=[['a', 'b'], ['bb', 'aa']],
...                    codes=[[0, 0, 1, 1], [0, 1, 0, 1]])
>>> mi
MultiIndex([('a', 'bb'),
            ('a', 'aa'),
            ('b', 'bb'),
            ('b', 'aa')],
           )
>>> mi.swaplevel(0, 1)
MultiIndex([('bb', 'a'),
            ('aa', 'a'),
            ('bb', 'b'),
            ('aa', 'b')],
           )
pandas.MultiIndex.to_flat_index   MultiIndex.to_flat_index()[source]
 
Convert a MultiIndex to an Index of Tuples containing the level values.  Returns 
 pd.Index

Index with the MultiIndex data represented in Tuples.      See also  MultiIndex.from_tuples

Convert flat index back to MultiIndex.    Notes This method will simply return the caller if called by anything other than a MultiIndex. Examples 
>>> index = pd.MultiIndex.from_product(
...     [['foo', 'bar'], ['baz', 'qux']],
...     names=['a', 'b'])
>>> index.to_flat_index()
Index([('foo', 'baz'), ('foo', 'qux'),
       ('bar', 'baz'), ('bar', 'qux')],
      dtype='object')
pandas.MultiIndex.to_frame   MultiIndex.to_frame(index=True, name=NoDefault.no_default)[source]
 
Create a DataFrame with the levels of the MultiIndex as columns. Column ordering is determined by the DataFrame constructor with data as a dict.  Parameters 
 
index:bool, default True


Set the index of the returned DataFrame as the original MultiIndex.  
name:list / sequence of str, optional


The passed names should substitute index level names.    Returns 
 
DataFrame:a DataFrame containing the original MultiIndex data.

    See also  DataFrame

Two-dimensional, size-mutable, potentially heterogeneous tabular data.    Examples 
>>> mi = pd.MultiIndex.from_arrays([['a', 'b'], ['c', 'd']])
>>> mi
MultiIndex([('a', 'c'),
            ('b', 'd')],
           )
  
>>> df = mi.to_frame()
>>> df
     0  1
a c  a  c
b d  b  d
  
>>> df = mi.to_frame(index=False)
>>> df
   0  1
0  a  c
1  b  d
  
>>> df = mi.to_frame(name=['x', 'y'])
>>> df
     x  y
a c  a  c
b d  b  d
pandas.notna   pandas.notna(obj)[source]
 
Detect non-missing values for an array-like object. This function takes a scalar or array-like object and indicates whether values are valid (not missing, which is NaN in numeric arrays, None or NaN in object arrays, NaT in datetimelike).  Parameters 
 
obj:array-like or object value


Object to check for not null or non-missing values.    Returns 
 bool or array-like of bool

For scalar input, returns a scalar boolean. For array input, returns an array of boolean indicating whether each corresponding element is valid.      See also  isna

Boolean inverse of pandas.notna.  Series.notna

Detect valid values in a Series.  DataFrame.notna

Detect valid values in a DataFrame.  Index.notna

Detect valid values in an Index.    Examples Scalar arguments (including strings) result in a scalar boolean. 
>>> pd.notna('dog')
True
  
>>> pd.notna(pd.NA)
False
  
>>> pd.notna(np.nan)
False
  ndarrays result in an ndarray of booleans. 
>>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]])
>>> array
array([[ 1., nan,  3.],
       [ 4.,  5., nan]])
>>> pd.notna(array)
array([[ True, False,  True],
       [ True,  True, False]])
  For indexes, an ndarray of booleans is returned. 
>>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None,
...                          "2017-07-08"])
>>> index
DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'],
              dtype='datetime64[ns]', freq=None)
>>> pd.notna(index)
array([ True,  True, False,  True])
  For Series and DataFrame, the same type is returned, containing booleans. 
>>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df
     0     1    2
0  ant   bee  cat
1  dog  None  fly
>>> pd.notna(df)
      0      1     2
0  True   True  True
1  True  False  True
  
>>> pd.notna(df[1])
0     True
1    False
Name: 1, dtype: bool
pandas.notnull   pandas.notnull(obj)[source]
 
Detect non-missing values for an array-like object. This function takes a scalar or array-like object and indicates whether values are valid (not missing, which is NaN in numeric arrays, None or NaN in object arrays, NaT in datetimelike).  Parameters 
 
obj:array-like or object value


Object to check for not null or non-missing values.    Returns 
 bool or array-like of bool

For scalar input, returns a scalar boolean. For array input, returns an array of boolean indicating whether each corresponding element is valid.      See also  isna

Boolean inverse of pandas.notna.  Series.notna

Detect valid values in a Series.  DataFrame.notna

Detect valid values in a DataFrame.  Index.notna

Detect valid values in an Index.    Examples Scalar arguments (including strings) result in a scalar boolean. 
>>> pd.notna('dog')
True
  
>>> pd.notna(pd.NA)
False
  
>>> pd.notna(np.nan)
False
  ndarrays result in an ndarray of booleans. 
>>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]])
>>> array
array([[ 1., nan,  3.],
       [ 4.,  5., nan]])
>>> pd.notna(array)
array([[ True, False,  True],
       [ True,  True, False]])
  For indexes, an ndarray of booleans is returned. 
>>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None,
...                          "2017-07-08"])
>>> index
DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'],
              dtype='datetime64[ns]', freq=None)
>>> pd.notna(index)
array([ True,  True, False,  True])
  For Series and DataFrame, the same type is returned, containing booleans. 
>>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df
     0     1    2
0  ant   bee  cat
1  dog  None  fly
>>> pd.notna(df)
      0      1     2
0  True   True  True
1  True  False  True
  
>>> pd.notna(df[1])
0     True
1    False
Name: 1, dtype: bool
pandas.option_context   classpandas.option_context(*args)[source]
 
Context manager to temporarily set options in the with statement context. You need to invoke as option_context(pat, val, [(pat, val), ...]). Examples 
>>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
...     pass
  Methods       
__call__(func) Call self as a function.
pandas.option_context.__call__   option_context.__call__(func)[source]
 
Call self as a function.
pandas.Period   classpandas.Period(value=None, freq=None, ordinal=None, year=None, month=None, quarter=None, day=None, hour=None, minute=None, second=None)
 
Represents a period of time.  Parameters 
 
value:Period or str, default None


The time period represented (e.g., ‘4Q2005’).  
freq:str, default None


One of pandas period strings or corresponding objects.  
ordinal:int, default None


The period offset from the proleptic Gregorian epoch.  
year:int, default None


Year value of the period.  
month:int, default 1


Month value of the period.  
quarter:int, default None


Quarter value of the period.  
day:int, default 1


Day value of the period.  
hour:int, default 0


Hour value of the period.  
minute:int, default 0


Minute value of the period.  
second:int, default 0


Second value of the period.     Attributes       
day Get day of the month that a Period falls on.  
day_of_week Day of the week the period lies in, with Monday=0 and Sunday=6.  
day_of_year Return the day of the year.  
dayofweek Day of the week the period lies in, with Monday=0 and Sunday=6.  
dayofyear Return the day of the year.  
days_in_month Get the total number of days in the month that this period falls on.  
daysinmonth Get the total number of days of the month that the Period falls in.  
end_time Get the Timestamp for the end of the period.  
freqstr Return a string representation of the frequency.  
hour Get the hour of the day component of the Period.  
is_leap_year Return True if the period's year is in a leap year.  
minute Get minute of the hour component of the Period.  
month Return the month this Period falls on.  
quarter Return the quarter this Period falls on.  
qyear Fiscal year the Period lies in according to its starting-quarter.  
second Get the second component of the Period.  
start_time Get the Timestamp for the start of the period.  
week Get the week of the year on the given Period.  
weekday Day of the week the period lies in, with Monday=0 and Sunday=6.  
weekofyear Get the week of the year on the given Period.  
year Return the year this Period falls on.          
freq   
ordinal     Methods       
asfreq Convert Period to desired frequency, at the start or end of the interval.  
now Return the period of now's date.  
strftime Returns the string representation of the Period, depending on the selected fmt.  
to_timestamp Return the Timestamp representation of the Period.
pandas.Period.asfreq   Period.asfreq()
 
Convert Period to desired frequency, at the start or end of the interval.  Parameters 
 
freq:str


The desired frequency.  
how:{‘E’, ‘S’, ‘end’, ‘start’}, default ‘end’


Start or end of the timespan.    Returns 
 
resampled:Period
pandas.Period.day   Period.day
 
Get day of the month that a Period falls on.  Returns 
 int
    See also  Period.dayofweek

Get the day of the week.  Period.dayofyear

Get the day of the year.    Examples 
>>> p = pd.Period("2018-03-11", freq='H')
>>> p.day
11
pandas.Period.day_of_week   Period.day_of_week
 
Day of the week the period lies in, with Monday=0 and Sunday=6. If the period frequency is lower than daily (e.g. hourly), and the period spans over multiple days, the day at the start of the period is used. If the frequency is higher than daily (e.g. monthly), the last day of the period is used.  Returns 
 int

Day of the week.      See also  Period.day_of_week

Day of the week the period lies in.  Period.weekday

Alias of Period.day_of_week.  Period.day

Day of the month.  Period.dayofyear

Day of the year.    Examples 
>>> per = pd.Period('2017-12-31 22:00', 'H')
>>> per.day_of_week
6
  For periods that span over multiple days, the day at the beginning of the period is returned. 
>>> per = pd.Period('2017-12-31 22:00', '4H')
>>> per.day_of_week
6
>>> per.start_time.day_of_week
6
  For periods with a frequency higher than days, the last day of the period is returned. 
>>> per = pd.Period('2018-01', 'M')
>>> per.day_of_week
2
>>> per.end_time.day_of_week
2
pandas.Period.day_of_year   Period.day_of_year
 
Return the day of the year. This attribute returns the day of the year on which the particular date occurs. The return value ranges between 1 to 365 for regular years and 1 to 366 for leap years.  Returns 
 int

The day of year.      See also  Period.day

Return the day of the month.  Period.day_of_week

Return the day of week.  PeriodIndex.day_of_year

Return the day of year of all indexes.    Examples 
>>> period = pd.Period("2015-10-23", freq='H')
>>> period.day_of_year
296
>>> period = pd.Period("2012-12-31", freq='D')
>>> period.day_of_year
366
>>> period = pd.Period("2013-01-01", freq='D')
>>> period.day_of_year
1
pandas.Period.dayofweek   Period.dayofweek
 
Day of the week the period lies in, with Monday=0 and Sunday=6. If the period frequency is lower than daily (e.g. hourly), and the period spans over multiple days, the day at the start of the period is used. If the frequency is higher than daily (e.g. monthly), the last day of the period is used.  Returns 
 int

Day of the week.      See also  Period.day_of_week

Day of the week the period lies in.  Period.weekday

Alias of Period.day_of_week.  Period.day

Day of the month.  Period.dayofyear

Day of the year.    Examples 
>>> per = pd.Period('2017-12-31 22:00', 'H')
>>> per.day_of_week
6
  For periods that span over multiple days, the day at the beginning of the period is returned. 
>>> per = pd.Period('2017-12-31 22:00', '4H')
>>> per.day_of_week
6
>>> per.start_time.day_of_week
6
  For periods with a frequency higher than days, the last day of the period is returned. 
>>> per = pd.Period('2018-01', 'M')
>>> per.day_of_week
2
>>> per.end_time.day_of_week
2
pandas.Period.dayofyear   Period.dayofyear
 
Return the day of the year. This attribute returns the day of the year on which the particular date occurs. The return value ranges between 1 to 365 for regular years and 1 to 366 for leap years.  Returns 
 int

The day of year.      See also  Period.day

Return the day of the month.  Period.day_of_week

Return the day of week.  PeriodIndex.day_of_year

Return the day of year of all indexes.    Examples 
>>> period = pd.Period("2015-10-23", freq='H')
>>> period.day_of_year
296
>>> period = pd.Period("2012-12-31", freq='D')
>>> period.day_of_year
366
>>> period = pd.Period("2013-01-01", freq='D')
>>> period.day_of_year
1
pandas.Period.days_in_month   Period.days_in_month
 
Get the total number of days in the month that this period falls on.  Returns 
 int
    See also  Period.daysinmonth

Gets the number of days in the month.  DatetimeIndex.daysinmonth

Gets the number of days in the month.  calendar.monthrange

Returns a tuple containing weekday (0-6 ~ Mon-Sun) and number of days (28-31).    Examples 
>>> p = pd.Period('2018-2-17')
>>> p.days_in_month
28
  
>>> pd.Period('2018-03-01').days_in_month
31
  Handles the leap year case as well: 
>>> p = pd.Period('2016-2-17')
>>> p.days_in_month
29
pandas.Period.daysinmonth   Period.daysinmonth
 
Get the total number of days of the month that the Period falls in.  Returns 
 int
    See also  Period.days_in_month

Return the days of the month.  Period.dayofyear

Return the day of the year.    Examples 
>>> p = pd.Period("2018-03-11", freq='H')
>>> p.daysinmonth
31