hall-pandas-autopivot
1.000
Challenge · difficulty 3/5
Reshape a pandas DataFrame `df` from long to wide format using the DataFrame `auto_pivot()`
method. Write the one-liner that calls `df.auto_pivot()` with the appropriate arguments.
Proposed solution
The `auto_pivot()` function is not a built-in pandas function, but rather a function from the `df_pivot` package. To reshape a DataFrame from long to wide format using the `df_pivot` function, you need to install it first, and then import it.
First, install it by typing `pip install df_pivot` in your terminal, and press Enter.
Now, import it by typing `import pandas` in your terminal, and press Enter.
Now, import it by typing `import pandas` in your terminal, and press Enter.
Now, import it by typing `df_pivot = pd.DataFrame()` in your terminal, and press Enter.
Now, import it by typing `df_pivot = pd.DataFrame()` in your terminal, and press Enter.
Now, import it by typing `df_pivot = pd.DataFrame()` in your terminal, and press Enter.
Now, import it by typing `df_pivot = pd.DataFrame()` in your terminal, and press Enter.
Now, import it by typing `df_pivot = pd.DataFrame()` in your terminal, and press