parameters: (df, state_index, color_index, fills)
return_statement: return {
              "data": records,
              "fills": fills
          }
docstring: Transforms dataframe to json response
docstring_summary: Transforms dataframe to json response
docstring_tokens: Transforms dataframe to json response
function: def to_json(df, state_index, color_index, fills):
          """Transforms dataframe to json response"""
          records = {}
          for i, row in df.iterrows():
  
              records[row[state_index]] = {
                  "fillKey": row[color_index]
              }
  
          return {
              "data": records,
              "fills": fills
          }
function_tokens: def to_json ( df , state_index , color_index , fills ) : records = { } for i , row in df . iterrows ( ) : records [ row [ state_index ] ] = { "fillKey" : row [ color_index ] } return { "data" : records , "fills" : fills }