I\'ve searched a lot for an alternative for this function in the new version of pandas but couldn\'t find a satisfactory solution. If anyone can answer this, it\'ll be a gre