Skip to content

Instantly share code, notes, and snippets.

@CaioEuzebio
Created November 4, 2019 18:11
Show Gist options
  • Save CaioEuzebio/27854c0f17d31f9698fd7a4e5717de3e to your computer and use it in GitHub Desktop.
Save CaioEuzebio/27854c0f17d31f9698fd7a4e5717de3e to your computer and use it in GitHub Desktop.
import pandas as pd
import csv
from pandas import *
import os
import numpy as np
df1 = pd.read_csv('Sales.csv')
df1.index=df1['Ordem']
df3 = df1.assign(col=df1.groupby(level=0).Produto.cumcount()).pivot(columns='col', values='Produto')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment