python/datasources/covid_tracking_project.py
def _replace_value(row: pd.Series, indicator_column: str,
                       old_name: Race, new_name: Race):
        """Helper method for _rename_race_category. Conditionally replaces
           the race value for a given row.

        Args:
        row: A single row (pandas.Series) to modify
        indicator_column: Name of the column that indicates whether to modify
            the race value.
        old_name: The race category to change
        new_name: The race category to rename to"""
        if (row[indicator_column] is True and
                row[col_std.RACE_COL] == old_name.value):
            return new_name.value
        return row[col_std.RACE_COL]
Helper method for _rename_race_category. Conditionally replaces
           the race value for a given row.

        Args:
        row: A single row (pandas.Series) to modify
        indicator_column: Name of the column that indicates whether to modify
            the race value.
        old_name: The race category to change
        new_name: The race category to rename to
Helper method for _rename_race_category. Conditionally replaces
the race value for a given row.

A single row (pandas.Series) to modify
indicator_column: Name of the column that indicates whether to modify
the race value.
old_name: The race category to change
new_name: The race category to rename to
Helper method for _rename_race_category . Conditionally replaces the race value for a given row . A single row ( pandas . Series ) to modify indicator_column : Name of the column that indicates whether to modify the race value . old_name : The race category to change new_name : The race category to rename to
def _replace_value(row: pd.Series, indicator_column: str,
                       old_name: Race, new_name: Race):
        if (row[indicator_column] is True and
                row[col_std.RACE_COL] == old_name.value):
            return new_name.value
        return row[col_std.RACE_COL]
def _replace_value ( row : pd . Series , indicator_column : str , old_name : Race , new_name : Race ) : if ( row [ indicator_column ] is True and row [ col_std . RACE_COL ] == old_name . value ) : return new_name . value return row [ col_std . RACE_COL ]
Helper method for _rename_race_category.
Helper method for _rename_race_category .
"""Helper method for _rename_race_category. Conditionally replaces
           the race value for a given row.

        Args:
        row: A single row (pandas.Series) to modify
        indicator_column: Name of the column that indicates whether to modify
            the race value.
        old_name: The race category to change
        new_name: The race category to rename to"""
row
pd.Series
indicator_column
str
old_name
Race
new_name
Race