Skip to content

Commit

Permalink
Drop LSqft/Ac column if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
perfectly-preserved-pie committed Jul 8, 2024
1 parent e5b3209 commit 9f51e07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions buy_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
# Merge all sheets into a single DataFrame
df = pd.concat(xlsx.values())

# Drop the LSqft/Ac column
df = df.drop(columns=['LSqft/Ac'])
# Drop the LSqft/Ac column only if it exists
if 'LSqft/Ac' in df.columns:
df = df.drop(columns=['LSqft/Ac'])

pd.set_option("display.precision", 10)

Expand Down

0 comments on commit 9f51e07

Please sign in to comment.