(df, index, columns, values)
| 449 | |
| 450 | |
| 451 | def pivot_count(df, index, columns, values): |
| 452 | # we cannot determine dtype until concatenationg all partitions. |
| 453 | # make dtype deterministic, always coerce to np.float64 |
| 454 | return pd.pivot_table( |
| 455 | df, |
| 456 | index=index, |
| 457 | columns=columns, |
| 458 | values=values, |
| 459 | aggfunc="count", |
| 460 | dropna=False, |
| 461 | observed=False, |
| 462 | ).astype(np.float64) |
| 463 | |
| 464 | |
| 465 | def pivot_first(df, index, columns, values): |
nothing calls this directly
no test coverage detected