Want to know how much the values in a series or data frame have changed from row to row? Meet the "diff" method, which will calculate this for you -- either from the previous row, or from any other row. And if you want to know the percentage change? Just use "pct_change" instead.
Смотрите видео Comparing values in Pandas with diff and pct_change онлайн без регистрации, длительностью 06 минут 46 секунд в хорошем hd качестве. Это видео добавил пользователь Python and Pandas with Reuven Lerner 07 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 747 раз и оно понравилось 28 людям.