Find Jobs
Hire Freelancers

Fix my Code For Pandas-Python

₱440-1200 PHP

Anuluar
Postuar over 6 years ago

₱440-1200 PHP

Paguhet në dorëzim
Hello, so I am building a simple app here I wanted some values in my CSV to be updated in a 15 minutes, I wanted this app to run on background. However I couldn't get it to work the way I want to. I wanted it to run on background while I am seeing the landing page of my app. which is index HTML Here's what I tried out: I'm using the pandas, sched and time imports here: #INTERFACE @[login to view URL]("/") def home(): s = [login to view URL]([login to view URL], [login to view URL]) [login to view URL](15, 1, timer) [login to view URL]() return render_template("[login to view URL]") #TIMER def timer(): timer = 0 csv_file='C:\Python27\Walmart\[login to view URL]' print("UPDATING") data_df = pd.read_csv(csv_file) print("READ") for i, row in [login to view URL]() : sku = [login to view URL][i]['Walmart SKU'] print (sku) if sku is '': break else: update(sku) print("Item Updated") print("UPDATECOMPLETE") home() #UPDATE def update(sku): lookup=str(sku) lookup = [login to view URL]('.0', '') product = wapy.product_lookup(lookup) ts = [login to view URL]() st = [login to view URL]().strftime('%Y-%m-%d %I:%M %p') print ([login to view URL]) if product.available_online is 'TRUE': instock = 'yes' else: instock ='no' quote_page = product.product_url page = urlopen(quote_page) soup = BeautifulSoup(page, '[login to view URL]') sold_box = [login to view URL]('a', attrs={'class': 'font-bold prod-SoldShipByMsg'}) sold = [login to view URL]() left_box = [login to view URL]('div', attrs={'class': 'prod-ProductOffer-urgencyMsg'}) left = [login to view URL]() if left is '': stock=[login to view URL] else: stock=left # fields=[lookup + ',' + '$'+str(product.sale_price) + ',' + instock + ',' + stock + ',' + str(sold) + ',' + st + ',' + '$'+str([login to view URL])] pathto_csv = 'C:\Python27\Walmart\[login to view URL]' data_df = pd.read_csv(pathto_csv) print("CSV READ") data_df.set_value([lookup], ['Price'], '$'+str(product.sale_price)) data_df.set_value([lookup], ['In Stock'], instock ) data_df.set_value([lookup], ['Quantity'], stock) data_df.set_value([lookup], ['Last Update'], str(sold)) data_df.set_value([lookup], ['Min Price'], '$'+str([login to view URL])) data_df.to_csv(pathto_csv) with open(r'[login to view URL]', 'a') as f: writer = [login to view URL](f, delimiter=' ', quotechar = ' ') [login to view URL](fields) print(st) print("UPDATED! 15 Minutes Have Passed!") To make it short I have two problems here that I can't solve 1. On replacing the value on my update I'm getting this error: KeyError: "['879091509'] not in index" I am asuming here that [row],[column], would let me replace the value I want for that cell, for example" data_df.set_value([lookup], ['Price'], '$'+str(product.sale_price)) I am reading this as, on row of where my SKU or ID is represented by ['lookup'], I will replace the ['Price'] by '$'+str(product.sale_price) 2. I can't get to my interface, because i think when the time resets it runs the code again. How can I make this run only in background? It's just fixing a code.
ID e Projektit: 16017432

Rreth projektit

11 propozime
Projekt në distancë
Aktive 6 yrs ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë
11 profesionistët e pavarur ofrojnë mesatarisht ₱966 PHP oferta për këtë punë
Avatari i Përdoruesit
Sir/Madam, I am an experienced Python Developer with 2 years of experience. I have worked in a fintech startup for 6 months on Python libraries like Numpy, Pandas, Scikit learn. I can fix the code for you in a day. Moreover, the work will be my own not freelanced again to someone else. Yash
₱1 200 PHP në 2 ditë
5,0 (44 përshtypje)
5,2
5,2
Avatari i Përdoruesit
Hi, I'm a developer specialized in Python and VBA. Please take a look at my profile below. https://www.freelancer.com/u/harupy Thank you, harupy
₱660 PHP në 1 ditë
5,0 (47 përshtypje)
4,4
4,4
Avatari i Përdoruesit
xaleava project only for now, accept and get xa;eavaxaleava project only for now, accept and get xa;eavaxaleava project only for now, accept and get xa;eavaxaleava project only for now, accept and get xa;eavaxaleava project only for now, accept and get xa;eavaxaleava project only for now, accept and get xa;eava
₱1 040 PHP në 0 ditë
4,4 (5 përshtypje)
2,7
2,7
Avatari i Përdoruesit
Our elite panel of developers, deliver the most, exquisite websites and apps, for all major platforms. These products are optimized for breath-taking performance and smooth user experience, which makes your business, customer friendly and allow your sales, to shoot through the sky.
₱440 PHP në 6 ditë
5,0 (6 përshtypje)
2,1
2,1
Avatari i Përdoruesit
Hello, My name is fasil a certified  lead generation expert,got 6+ years of experience in lead generation. I have designed a tool that makes use of API technologies and i use that to generate leads. I am fully expert in web research, extracting email, data mining, Google, Bing, Yahoo, MS Office,Excel, (Full), CSS Data entry ,web scraping , B2B Marketing, Lead Generation, Directory and other related programs. You can test the quality of my leads and also i provide leads at best price in the market I can provide samples ,if needed Regards Fasil
₱445 PHP në 3 ditë
0,0 (0 përshtypje)
0,0
0,0
Avatari i Përdoruesit
You are encountering two distinct problems. 1. web app auto restart with given time delta (which I am not getting all the point of what you want to achieve). 2. data processing with pandas, some function misusage(which I need a real formatted python code script and the input data to solve the problem). Hoping to get the first job on the freelancer. If not, hope other guys give u a clean and elegant solution.
₱1 220 PHP në 2 ditë
0,0 (0 përshtypje)
0,0
0,0

Rreth klientit

Flamuri i PHILIPPINES
Iligan City, Philippines
5,0
12
Mënyra e pagesës u verifikua
Anëtar që nga jan 23, 2013

Verifikimi i klientit

Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.