A
A
Alexander Osherov2018-11-09 17:37:04
Python
Alexander Osherov, 2018-11-09 17:37:04

How to binarize a column in Series pandas?

We need to binorize a pandas Series column so that values ​​greater than i are 1 and the rest are 0.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Therapyx, 2018-11-09
@Alexandr2001

panda[panda>i] = 1
panda[panda<=i] = 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question