Thank you! I followed along exactly as you demonstrated and I got my CSV into sqlite programmatically! Thank you!
@tonygojanovic5543 жыл бұрын
You're welcome!
@dominickbudzisz96514 жыл бұрын
Thank you so much! This was exactly what I have needed for the last five hours! You are a god send!
@tonygojanovic5543 жыл бұрын
Glad I could help!
@anthonywilly87563 жыл бұрын
Please , how do you manage to print the row into a text file. how did you manage to save your print(row) to a text file. thank you.
@danielevans51254 жыл бұрын
Thanks for the clear explanation and clean/clear code! It's much appreciated. There very well could be some user-error on my part, but I found that executing and committing one row at a time was very slow for me (again, maybe this was my fault!). In a similar approach, I dumped the csv file contents into a list (using a list comprehension) and then used "cur.executemany()" to populate the database all at once...this worked for me and my data (about 30 MB) in probably one second or less. Just wanted to share in case others experience a similar issue. Another alternative is to read the csv file into a Pandas dataframe and then output the dataframe to a sqlite database.
@tonygojanovic5544 жыл бұрын
Thanks, I appreciate the feedback and suggestions.
@agstatworks37014 жыл бұрын
Thanks for the comment!
@vasudevdevadiga15634 жыл бұрын
Hey can you please share your code with me ? It will be of great help. My mailid is namitachetan9287@gmail.com
@danielevans2574 жыл бұрын
Hi
@ravirajkhatu56243 жыл бұрын
I am getting error when there is a blank in the file and it is giving data type error when it is INT type column. Is there any solution?
@mustafadar2543 жыл бұрын
How can we initialise a column if it has date time values Like this: datetime=DATETIME(row[0]) ??
@Sreenu15233 жыл бұрын
Hi I need to compare data text file with db table below scenarios Note: text file don't have header 1. Count of records file and table 2. Is file data same as in table It would be great if u share any video or link
@vasudevdevadiga15634 жыл бұрын
What if the CSV file has headers
@paulpavlinskyi47933 жыл бұрын
You can remove a header. Next it while reading or use pop(), remove() functions.
@creyssu3 жыл бұрын
i'm trying to do an webapp to query some data an this is exactly what i need, thank you so much!!
@tonygojanovic5543 жыл бұрын
Glad I can help!!
@mainfurina3 жыл бұрын
My acutally Problem on this code is: attribute4 = row[4] IndexError: list index out of range. The last row is really speciality, thats why some data sets have 4 entries and some 5, but I don't know how i could say: if the last row don't exist in some datasets that you can add an entry for attribute4 = "N/A". I'm to new in python xD.
@shivampatel4179 Жыл бұрын
can I get the source code??
@labheshlalka96664 жыл бұрын
Thank you ..it was a wonderful explaination...for csv file
@agstatworks37014 жыл бұрын
Thank you!
@agstatworks37014 жыл бұрын
Thank you for the comment!
@me.68032 жыл бұрын
@@agstatworks3701 this code running on which ide
@nazarm62153 жыл бұрын
I'm enticed to switch over for scripting race conditions in nodejs are killing me.
@martygeorgiev60864 жыл бұрын
Whatever I do I keep getting an error like ' TypeError: function takes at most 2 arguments (10 given) '. Can anyone give me hint on how to solve that, please?
@Styleitwithvaish3 жыл бұрын
Facing same issue. Did you get any solution?
@martygeorgiev60863 жыл бұрын
@@Styleitwithvaish Yes, I got the solution and i will be able to help you out. I am quite busy at the moment but I will post the solution as a comment here so look again after 3 or 4 hours ;)
@martygeorgiev60863 жыл бұрын
Can you show me ur code somehow please?
@martygeorgiev60863 жыл бұрын
@@Styleitwithvaish I'm sorry for the late replay. ' StonedCannibal#5445 ' is my Discord account, add if you want, will be easier to share my code as well
@hjsjsetyjdytj4 жыл бұрын
Thanks for the tutorial! Your exact code didn't work for me ... I had to change all the '?' to '%s' for my code to work, but that was about it!
@agstatworks37014 жыл бұрын
Super! Glad I could help!
@mustafadar2543 жыл бұрын
why %s Antonio?
@goodnight25652 жыл бұрын
no way i am a big fan of EXO, the korean boy band and i am learning python... seeing exoplanet here is just an amazing coincidence
@agstatworks37012 жыл бұрын
Cool!
@jananishanmugam82044 жыл бұрын
Thank you so much... This helped me a lot
@agstatworks37014 жыл бұрын
You are very welcome!
@mustafadar2543 жыл бұрын
@@agstatworks3701 How can we initialise a column if it has date time values Like this: datetime=DATETIME(row[0]) ??
@entersac4 жыл бұрын
pleace conpart you projest
@adamnagy45442 жыл бұрын
SQLite studio is do it for you without any code dude....
@tonygojanovic5542 жыл бұрын
Thanks for your insight! Greatly appreciated!
@OggVorbis693 жыл бұрын
This is a great example how not to do this task. This is sadly what I see when working with so called web programmers that are touting a great effort in their attempt to not use the most useful and in some cases expensive piece of their system -their database. Please viewers, use this as an sql example in python. Never import DSV in a db especially in volume by sql statement per row. This is slow, loads your db cpu and is just to efficient. I’m so sad when I see web systems just crippled by this type of using the db.
@tonygojanovic5543 жыл бұрын
Thanks for the reply and insight. There are many ways to do things in this world, some work better than others for some things, and some don't (This applies to not only programming...you should try woodworking some day). Depends on the context and application of your problem. For some problems, a simple solutions like this works well. Others it may not. You can always build and modify on solutions or try something unique and better. I am open to suggestions and ideas. Thanks for the comment and have a great programming day!
@yisunshin72453 жыл бұрын
@TS, if you know so much, make a video and show us all how it’s done. Your criticism without context, credibility, credentials, nor demonstrating an example of how it’s done is beyond childish.