docstr: Tests an empty dataframe is returned if you give an empty dataframe
docstr_tok: ["Tests","an","empty","dataframe","is","returned","if","you","give","an","empty","dataframe"]
code: def test_accept_empty(self):
      """Tests an empty dataframe is returned if you give an empty dataframe"""
      empty_frame = pd.DataFrame()
      result = average(empty_frame)
  
      assert result.empty
      assert result.equals(empty_frame)
  
      empty_frame = pd.DataFrame(columns=["order", "best"])
      result = average(empty_frame)
  
      assert result.empty
      assert "best_mean" not in result.columns
      assert "best_var" not in result.columns
      assert result.equals(empty_frame)
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.ensemble import AdaBoostRegressor, BaggingRegressor, ExtraTreesRegressor, GradientBoostingRegressor, RandomForestRegressor
  from orion.analysis.base import average, flatten_numpy, flatten_params, ranking, to_numpy, train_regressor
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 1 for calling the TestAverage obj's underlying member method code with example usage: obj.test_accept_empty() without return types