Skip to content

Commit

Permalink
Update generate_csv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rishavpramanik authored Apr 4, 2022
1 parent 60f7884 commit c941a85
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions utils/generate_csv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from msilib.schema import Directory
import os
import pandas as pd
from sklearn.utils import shuffle
Expand Down Expand Up @@ -34,15 +33,12 @@ def generate_csv(path):

for filename in os.listdir(directory):

path = directory + "/" + filename #required path
data.append([ filename , path , unique])
paths = directory + "/" + filename #required path
data.append([ filename , paths , unique])

df = pd.DataFrame(data, columns = ["filename" ,"path", "class"])
df = shuffle(df)
name = "csv_files/" + "Data-full" #required path
df.to_csv(name, index = False)
print("Generation Complete")
return df



return df

0 comments on commit c941a85

Please sign in to comment.