Skip to content

Commit

Permalink
fixed fetching first row
Browse files Browse the repository at this point in the history
  • Loading branch information
ionnich committed May 3, 2023
1 parent 5584401 commit 96e98fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion save_creatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def verify_input():
if len(sys.argv) < 2:
files = os.listdir()
for file in files:
print(file)
if file.endswith(".xlsx"):
file = file
print(f"using {file}")
Expand All @@ -16,6 +17,7 @@ def verify_input():
file = sys.argv[1]
if not file.endswith(".xlsx"):
sys.exit("Input file must be an excel file (.xlsx)")
return file

sys.exit("No excel file")

Expand Down Expand Up @@ -47,7 +49,7 @@ def save_creatives(entry):

def main():
file = verify_input()
df = pd.read_excel(file)
df = pd.read_excel(file, header=None)

registry = []
for index, row in df.iterrows():
Expand Down

0 comments on commit 96e98fc

Please sign in to comment.