joemorgan commited on
Commit
651324b
1 Parent(s): 3684746

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -18
app.py CHANGED
@@ -1,18 +1 @@
1
- x = input()
2
- import pandas as pd
3
- df=pd.read_html(x)
4
- df=df[0]
5
- df = df.loc[:,['Products', 'Quantity']]
6
- df = df.astype({"Quantity":str})
7
- df = df[df["Quantity"].str.contains(".0")!=False]
8
- df = df.astype({"Quantity":float})
9
- df = df.astype({"Quantity":int})
10
- df = df.astype({"Quantity":str})
11
- df['Quantity'] = '(' + df['Quantity'] + ') '
12
- df = df.rename(columns={'Products': 'Product'})
13
- df["Quantity"] = df["Quantity"] + df["Product"]
14
- df = df.loc[:,['Quantity']]
15
- df = df.rename(columns={'Quantity': 'Product'})
16
- df['Product'] = df['Product'].str.upper()
17
- df = df.set_index('Product')
18
- df
 
1
+ print('hello world')