it can be challenging to follow its logic and flow, making it harder to debug or modify in the future.
To improve code readability, debugging, and maintainability, it is recommended to break down long chains of pandas instructions into smaller, more modular steps.
This can be done with the help of the pandas ``++pipe++`` method, which takes a function as a parameter.
This function takes the data frame as a parameter, operates on it and returns it for further processing.
Grouping complex transformations of a data frame inside a function with a meaningful name can further enhance the readability and maintainability of the code.
== How to fix it
To fix this issue refactor chains of instruction into a function that can be consumed by the ``++pandas.pipe++`` method.
return df.set_index('name').filter(like='joe', axis=0).groupby('team').mean().round().sort_values('salary').take([0]) # Noncompliant: too many operations happen on this data frame.