parameters: (df, name)
return_statement: return df.index.get_level_values(key)
docstring: Get the index level of a DataFrame given 'name' (column name in an arrow
      Schema).
docstring_summary: Get the index level of a DataFrame given 'name' (column name in an arrow
      Schema).
docstring_tokens: Get the index level of a DataFrame given name ( column name in an arrow Schema ) .
function: def _get_index_level(df, name):
      """
      Get the index level of a DataFrame given 'name' (column name in an arrow
      Schema).
      """
      key = name
      if name not in df.index.names and _is_generated_index_name(name):
          # we know we have an autogenerated name => extract number and get
          # the index level positionally
          key = int(name[len("__index_level_"):-2])
      return df.index.get_level_values(key)
function_tokens: def _get_index_level ( df , name ) : key = name if name not in df . index . names and _is_generated_index_name ( name ) : # we know we have an autogenerated name => extract number and get # the index level positionally key = int ( name [ len ( "__index_level_" ) : - 2 ] ) return df . index . get_level_values ( key )