Pandas apply casts None dtype to object or float depending on other outputs
Pandas apply casts None dtype to object or float depending on other outputs Question: I would like to control the output dtypes for apply on a row. foo and bar below have multiple outputs. import pandas as pd def foo(x): return x[‘a’] * x[‘b’], None, x[‘a’] > x[‘b’] def bar(x): return x[‘a’] * x[‘b’], None …