Skip to main content

All Questions

Tagged with
4 votes
3 answers
2k views

Optimizing the insertion of 400 000 records in sqlite

I have the python script that creates a sqlite database and fills it with data (originally coming from a json file). At the time I execute the code below, my word ...
Pux's user avatar
  • 155
3 votes
1 answer
217 views

SQL queries in a dataframe

I want to get table names and column names from queries in a dataframe. The dataframe is like this: ...
elisa's user avatar
  • 185
3 votes
0 answers
44 views

spark takes long time for checking an array of items present in another array

I am new to spark. I have two dataframes df1 and df2. df1 has three rows. df2 has more than few million rows. I want to check whether all items in df2 are in transaction of df1, if so sum up the costs....
priya's user avatar
  • 131
2 votes
1 answer
797 views

Parsing data from big json field and geocode services then store to PostgreSQL using psycopg2 instead django-orm

This code works, but my boss told me that it's very bad code, and don't want to deploy it. It is my first time working as a programmer and I have at least 3 months of experience. ...
kAldown's user avatar
  • 131
5 votes
1 answer
954 views

Inserting products scraped from the web into a database

I am trying to speed up the runtime of my program as the API can make calls. However after adding the inserts to a database 3 mins turns in 7 mins after 180 API calls, which can be one a second. How ...
Ben's user avatar
  • 163
3 votes
2 answers
2k views

Django ListView with MySQL query for the queryset

(Note: Even if you don't know Django, it's probably the query that needs work anyway, so you probably don't need to know Django/Python) I have a ListView that ...
ZAD-Man's user avatar
  • 247
6 votes
1 answer
340 views

Load drinks and their ingredients into dictionaries

I'm working on a web application using Bottle, and it is, at this point, functional. The gist of it is that I have a database of drinks, with associated IDs, and associated sets of ingredients. the ...
Tadgh's user avatar
  • 195