26 Apr 2023PythonUnknown

Method Chaining

notes and solution files for method chaining.

this entry collects the solution files i have for method chaining. i may expand it with a fuller write-up later, but the implementation files are already here.

available solution files

  • Python method-chaining/solution.py

Solution files

Pythonmethod-chaining/solution.py
import pandas as pd

def findHeavyAnimals(animals: pd.DataFrame) -> pd.DataFrame:
    return animals[animals[class="syntax-string">'weight'] > class="syntax-number">100].sort_values([class="syntax-string">'weight'],ascending=False)[[class="syntax-string">'name']]