Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to do the remainder Operation of Pandas

Shulou Source: shulou.com Published: 2022-06-01 14:21:46 10月05日 Update

This article introduces the relevant knowledge of "how to calculate the remainder of Pandas". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Divmod (a, b) remainder

S = pd.Series (np.arange (10)) print (s) 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9dtype: int64div, rem = divmod (s) 3) print (div) 0 0 1 0 2 0 3 1 4 1 5 1 6 2 7 2 8 29 3dtype: int64print (rem) 0 0 1 1 2 2 3 0 4 1 1 5 2 0 7 1 8 29 0dtype: int64 "how to do the remainder operation" is introduced here Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Computing content more knowledge practical successful learning next dilemma reality situation article case editing website industry process high quality learning related output Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Redmi Shulou Information Linux