@@ -1970,35 +1970,39 @@ def makeCustomDataframe(
1970
1970
r_idx_type = None ,
1971
1971
):
1972
1972
"""
1973
- nrows, ncols - number of data rows/cols
1974
- c_idx_names, idx_names - False/True/list of strings, yields No names ,
1975
- default names or uses the provided names for the levels of the
1976
- corresponding index. You can provide a single string when
1977
- c_idx_nlevels ==1.
1978
- c_idx_nlevels - number of levels in columns index. > 1 will yield MultiIndex
1979
- r_idx_nlevels - number of levels in rows index. > 1 will yield MultiIndex
1980
- data_gen_f - a function f(row,col) which return the data value
1981
- at that position, the default generator used yields values of the form
1982
- "RxCy" based on position.
1983
- c_ndupe_l, r_ndupe_l - list of integers, determines the number
1984
- of duplicates for each label at a given level of the corresponding
1985
- index. The default `None` value produces a multiplicity of 1 across
1986
- all levels, i.e. a unique index. Will accept a partial list of length
1987
- N < idx_nlevels, for just the first N levels. If ndupe doesn't divide
1988
- nrows/ncol, the last label might have lower multiplicity.
1989
- dtype - passed to the DataFrame constructor as is, in case you wish to
1990
- have more control in conjunction with a custom `data_gen_f`
1991
- r_idx_type, c_idx_type - "i"/"f"/"s"/"u"/"dt"/"td".
1992
- If idx_type is not None, `idx_nlevels` must be 1.
1993
- "i"/"f" creates an integer/float index,
1994
- "s"/"u" creates a string/unicode index
1995
- "dt" create a datetime index.
1996
- "td" create a timedelta index.
1997
-
1998
- if unspecified, string labels will be generated.
1973
+ Create a DataFrame using supplied parameters.
1999
1974
2000
- Examples:
1975
+ Parameters
1976
+ ----------
1977
+ nrows, ncols - number of data rows/cols
1978
+ c_idx_names, idx_names - False/True/list of strings, yields No names ,
1979
+ default names or uses the provided names for the levels of the
1980
+ corresponding index. You can provide a single string when
1981
+ c_idx_nlevels ==1.
1982
+ c_idx_nlevels - number of levels in columns index. > 1 will yield MultiIndex
1983
+ r_idx_nlevels - number of levels in rows index. > 1 will yield MultiIndex
1984
+ data_gen_f - a function f(row,col) which return the data value
1985
+ at that position, the default generator used yields values of the form
1986
+ "RxCy" based on position.
1987
+ c_ndupe_l, r_ndupe_l - list of integers, determines the number
1988
+ of duplicates for each label at a given level of the corresponding
1989
+ index. The default `None` value produces a multiplicity of 1 across
1990
+ all levels, i.e. a unique index. Will accept a partial list of length
1991
+ N < idx_nlevels, for just the first N levels. If ndupe doesn't divide
1992
+ nrows/ncol, the last label might have lower multiplicity.
1993
+ dtype - passed to the DataFrame constructor as is, in case you wish to
1994
+ have more control in conjunction with a custom `data_gen_f`
1995
+ r_idx_type, c_idx_type - "i"/"f"/"s"/"u"/"dt"/"td".
1996
+ If idx_type is not None, `idx_nlevels` must be 1.
1997
+ "i"/"f" creates an integer/float index,
1998
+ "s"/"u" creates a string/unicode index
1999
+ "dt" create a datetime index.
2000
+ "td" create a timedelta index.
2001
+
2002
+ if unspecified, string labels will be generated.
2001
2003
2004
+ Examples
2005
+ --------
2002
2006
# 5 row, 3 columns, default names on both, single index on both axis
2003
2007
>> makeCustomDataframe(5,3)
2004
2008
@@ -2514,7 +2518,6 @@ class RNGContext:
2514
2518
2515
2519
Examples
2516
2520
--------
2517
-
2518
2521
with RNGContext(42):
2519
2522
np.random.randn()
2520
2523
"""
@@ -2669,7 +2672,6 @@ def set_timezone(tz: str):
2669
2672
2670
2673
Examples
2671
2674
--------
2672
-
2673
2675
>>> from datetime import datetime
2674
2676
>>> from dateutil.tz import tzlocal
2675
2677
>>> tzlocal().tzname(datetime.now())
0 commit comments