g2801_2900.s2890_reshape_data_melt.solution.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-java Show documentation
Show all versions of leetcode-in-java Show documentation
Java-based LeetCode algorithm problem solutions, regularly updated
The newest version!
# #Easy #2023_12_25_Time_446_ms_(97.89%)_Space_60.5_MB_(68.02%)
import pandas as pd
def meltTable(report: pd.DataFrame) -> pd.DataFrame:
return report.melt(id_vars='product', var_name='quarter', value_name='sales')
© 2015 - 2024 Weber Informatics LLC | Privacy Policy