I have a big dataframe with 74 columns and 756270 rows, I would like to make sure there are no infinities in any of the rows of the dataframe. I tried using mutate but I got stuck with trying to check for the type of the column.
df,
for col <- across(0..73) do
{
col.name,
cond do
Series.and(Series.equal(Series.dtype(col), {:f, 64}), Series.is_infinite(col)) ->
:nan
true ->
col
end
}
end
)```