code: def test_pairwise_allows_dataframes_and_gives_correct_counts():
      N = 100
      N_groups = 5
      df = pd.DataFrame(np.empty((N, 3)), columns=["T", "C", "group"])
      df["T"] = np.random.exponential(1, size=N)
      df["C"] = np.random.binomial(1, 0.6, size=N)
      df["group"] = np.tile(np.arange(N_groups), 20)
      R = stats.pairwise_logrank_test(
          df["T"], df["group"], event_observed=df["C"]
      )
      assert R.summary.shape[0] == N_groups * (N_groups - 1) / 2
  
imports: import numpy
  import pandas
  import numpy.testing
  import pytest
  from pandas.testing import assert_frame_equal
  from lifelines import statistics
  from lifelines import CoxPHFitter, KaplanMeierFitter, WeibullFitter
  from lifelines.exceptions import StatisticalWarning
  from lifelines.datasets import load_waltons, load_g3, load_lymphoma, load_dd, load_regression_dataset, load_leukemia
label_desc: Use image node_id 23 for calling a global function with example usage: test_pairwise_allows_dataframes_and_gives_correct_counts() without return types