format number is not recognized in a cycle
__peter__ at web.de
Mon Feb 4 14:59:37 EST 2019
Diego Avesani wrote:
> Dear Peter, Deal all,
> Trying different options, I manage this solution:
> mask = (df['datatime'] > str(start_date[ii])) & (df['datatime'] <=
> As you can notice, I have put str before start_date[ii]) and end_date[ii].
> What do you think?
Don't use your workaround unless you have ensured that
you get the correct result. Comparisons between arbitrary types are
dangerous in Python 2:
>>> "10" > 1
>>> "1" > 1
>>> "0" > 1
Perhaps you can find a better approach when you post your problem in a
forum dedicated to pandas.
More information about the Python-list