pandas#
- fkat.utils.pandas.iter_rows(table: Iterator[DataFrame], replace_nan: bool = True) Iterator[dict[str, Any]][source]#
Generator function to iterate over rows of a Pandas
DataFrames in chunks.- Parameters:
table (Iterator[pd.DataFrame]) – Pandas
DataFrames.replace_nan (bool) – Whether to replace NaN with None. Defaults to True.
- Yields:
dict[str, Any] – Dictionary representing each row.