HF RL Explorer

Task: Reverse a Pandas DataFrame

Task: Reverse a Pandas DataFrame: a task in Terminal-Lego-15k (Harbor dataset). You need to write a Python script that correctly reverses a pandas DataFrame. The original code attempts to use reversed() directly on a DataFrame, which causes a KeyError because reversed() iterates over column names…

The task

You need to write a Python script that correctly reverses a pandas DataFrame. The original code attempts to use `reversed()` directly on a DataFrame, which causes a `KeyError` because `reversed()` iterates over column names in reverse order, not rows.

Part of PrimeIntellect/Terminal-Lego-15k.