groupby.pyi 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. from typing import Literal
  2. import numpy as np
  3. def group_median_float64(
  4. out: np.ndarray, # ndarray[float64_t, ndim=2]
  5. counts: np.ndarray, # ndarray[int64_t]
  6. values: np.ndarray, # ndarray[float64_t, ndim=2]
  7. labels: np.ndarray, # ndarray[int64_t]
  8. min_count: int = ..., # Py_ssize_t
  9. ) -> None: ...
  10. def group_cumprod_float64(
  11. out: np.ndarray, # float64_t[:, ::1]
  12. values: np.ndarray, # const float64_t[:, :]
  13. labels: np.ndarray, # const int64_t[:]
  14. ngroups: int,
  15. is_datetimelike: bool,
  16. skipna: bool = ...,
  17. ) -> None: ...
  18. def group_cumsum(
  19. out: np.ndarray, # numeric[:, ::1]
  20. values: np.ndarray, # ndarray[numeric, ndim=2]
  21. labels: np.ndarray, # const int64_t[:]
  22. ngroups: int,
  23. is_datetimelike: bool,
  24. skipna: bool = ...,
  25. ) -> None: ...
  26. def group_shift_indexer(
  27. out: np.ndarray, # int64_t[::1]
  28. labels: np.ndarray, # const int64_t[:]
  29. ngroups: int,
  30. periods: int,
  31. ) -> None: ...
  32. def group_fillna_indexer(
  33. out: np.ndarray, # ndarray[int64_t]
  34. labels: np.ndarray, # ndarray[int64_t]
  35. mask: np.ndarray, # ndarray[uint8_t]
  36. direction: Literal["ffill", "bfill"],
  37. limit: int, # int64_t
  38. dropna: bool,
  39. ) -> None: ...
  40. def group_any_all(
  41. out: np.ndarray, # uint8_t[::1]
  42. values: np.ndarray, # const uint8_t[::1]
  43. labels: np.ndarray, # const int64_t[:]
  44. mask: np.ndarray, # const uint8_t[::1]
  45. val_test: Literal["any", "all"],
  46. skipna: bool,
  47. ) -> None: ...
  48. def group_add(
  49. out: np.ndarray, # complexfloating_t[:, ::1]
  50. counts: np.ndarray, # int64_t[::1]
  51. values: np.ndarray, # ndarray[complexfloating_t, ndim=2]
  52. labels: np.ndarray, # const intp_t[:]
  53. min_count: int = ...,
  54. ) -> None: ...
  55. def group_prod(
  56. out: np.ndarray, # floating[:, ::1]
  57. counts: np.ndarray, # int64_t[::1]
  58. values: np.ndarray, # ndarray[floating, ndim=2]
  59. labels: np.ndarray, # const intp_t[:]
  60. min_count: int = ...,
  61. ) -> None: ...
  62. def group_var(
  63. out: np.ndarray, # floating[:, ::1]
  64. counts: np.ndarray, # int64_t[::1]
  65. values: np.ndarray, # ndarray[floating, ndim=2]
  66. labels: np.ndarray, # const intp_t[:]
  67. min_count: int = ..., # Py_ssize_t
  68. ddof: int = ..., # int64_t
  69. ) -> None: ...
  70. def group_mean(
  71. out: np.ndarray, # floating[:, ::1]
  72. counts: np.ndarray, # int64_t[::1]
  73. values: np.ndarray, # ndarray[floating, ndim=2]
  74. labels: np.ndarray, # const intp_t[:]
  75. min_count: int = ...,
  76. ) -> None: ...
  77. def group_ohlc(
  78. out: np.ndarray, # floating[:, ::1]
  79. counts: np.ndarray, # int64_t[::1]
  80. values: np.ndarray, # ndarray[floating, ndim=2]
  81. labels: np.ndarray, # const intp_t[:]
  82. min_count: int = ...,
  83. ) -> None: ...
  84. def group_quantile(
  85. out: np.ndarray, # ndarray[float64_t]
  86. values: np.ndarray, # ndarray[numeric, ndim=1]
  87. labels: np.ndarray, # ndarray[int64_t]
  88. mask: np.ndarray, # ndarray[uint8_t]
  89. q: float, # float64_t
  90. interpolation: Literal["linear", "lower", "higher", "nearest", "midpoint"],
  91. ) -> None: ...
  92. def group_last(
  93. out: np.ndarray, # rank_t[:, ::1]
  94. counts: np.ndarray, # int64_t[::1]
  95. values: np.ndarray, # ndarray[rank_t, ndim=2]
  96. labels: np.ndarray, # const int64_t[:]
  97. min_count: int = ..., # Py_ssize_t
  98. ) -> None: ...
  99. def group_nth(
  100. out: np.ndarray, # rank_t[:, ::1]
  101. counts: np.ndarray, # int64_t[::1]
  102. values: np.ndarray, # ndarray[rank_t, ndim=2]
  103. labels: np.ndarray, # const int64_t[:]
  104. min_count: int = ..., # int64_t
  105. rank: int = ..., # int64_t
  106. ) -> None: ...
  107. def group_rank(
  108. out: np.ndarray, # float64_t[:, ::1]
  109. values: np.ndarray, # ndarray[rank_t, ndim=2]
  110. labels: np.ndarray, # const int64_t[:]
  111. ngroups: int,
  112. is_datetimelike: bool,
  113. ties_method: Literal["aveage", "min", "max", "first", "dense"] = ...,
  114. ascending: bool = ...,
  115. pct: bool = ...,
  116. na_option: Literal["keep", "top", "bottom"] = ...,
  117. ) -> None: ...
  118. def group_max(
  119. out: np.ndarray, # groupby_t[:, ::1]
  120. counts: np.ndarray, # int64_t[::1]
  121. values: np.ndarray, # ndarray[groupby_t, ndim=2]
  122. labels: np.ndarray, # const int64_t[:]
  123. min_count: int = ...,
  124. ) -> None: ...
  125. def group_min(
  126. out: np.ndarray, # groupby_t[:, ::1]
  127. counts: np.ndarray, # int64_t[::1]
  128. values: np.ndarray, # ndarray[groupby_t, ndim=2]
  129. labels: np.ndarray, # const int64_t[:]
  130. min_count: int = ...,
  131. ) -> None: ...
  132. def group_cummin(
  133. out: np.ndarray, # groupby_t[:, ::1]
  134. values: np.ndarray, # ndarray[groupby_t, ndim=2]
  135. labels: np.ndarray, # const int64_t[:]
  136. ngroups: int,
  137. is_datetimelike: bool,
  138. ) -> None: ...
  139. def group_cummax(
  140. out: np.ndarray, # groupby_t[:, ::1]
  141. values: np.ndarray, # ndarray[groupby_t, ndim=2]
  142. labels: np.ndarray, # const int64_t[:]
  143. ngroups: int,
  144. is_datetimelike: bool,
  145. ) -> None: ...