3063. Method Chaining
My accepted Python solution to LeetCode problem 3063, Method Chaining, running in 297ms.
- Difficulty: Easy
- Python
- Runtime 297ms
- Memory 67.4MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 297ms, memory 67.4MB, accepted 2026-01-02.
import pandas as pd
def findHeavyAnimals(animals: pd.DataFrame) -> pd.DataFrame:
return animals[animals['weight'] > 100].sort_values(by='weight', ascending=False)[['name']]