Skip to content

Commit

Permalink
Merge pull request #550 from LasyaPalla/main
Browse files Browse the repository at this point in the history
Upadted getTransactions function in TransactionalDatabase.py
  • Loading branch information
udayRage authored Nov 13, 2024
2 parents 39c71cf + 8caf80a commit ed7106d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions PAMI/extras/syntheticDataGenerator/TransactionalDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ def save(self, filename):
f.write(str(self.sep).join(map(str, line)) + '\n')


def getdataasDataframe(self,sep='\t'):
column = 'Transaction'
dataFrame = pd.DataFrame(colums=column)
dataFrame[column] = [sep.join(map(str,line) for line in self.data)]
def getTransactions(self,sep='\t'):
transactions = []
for line in self.data:
transactions.append(line)

dataFrame = pd.DataFrame([transactions], index=['TransactionItems']).T
return dataFrame


Expand Down

0 comments on commit ed7106d

Please sign in to comment.