import math


def replace_invalid_values(row):
  """Replace float values that are not available in BigQuery.

  Args:
    row: List of values to insert into BigQuery.

  Returns:
    List, `row` with invalid values replaced with `None`.
  """
  invalid_values = [math.inf, -math.inf, math.nan]
  return [x if x not in invalid_values else None for x in row]