How to replace NaNs by preceding or next values in pandas DataFrame? How to replace NaNs by preceding or next values in pandas DataFrame? python-3.x python-3.x