Linked Questions

-1 votes
1 answer
2k views

I need to store the data from a .txt file to a database in Sqlite3. I first try to read the txt file: f = open("path", 'r') if f.mode=='r': content = f.read() then i printed the "content" to ...
Andres ZW's user avatar
0 votes
1 answer
171 views

I've a csv/json file. I need to include the file as a database for the django app. & I need to show the data as a table in frontend. So can't understand where I should insert the file so that it ...
Jyoti Akhter's user avatar
0 votes
0 answers
39 views

I'm using Python 3.6, and have written a file that takes all csv files in a folder and creates a table for each one in a database.db file using sqlite3. Then using sqlite3 database.db I can run sqlite ...
bunirules's user avatar
32 votes
4 answers
62k views

I read this: Importing a CSV file into a sqlite3 database table using Python and it seems that everyone suggests using line-by-line reading instead of using bulk .import from SQLite. However, that ...
Shar's user avatar
  • 507
14 votes
5 answers
39k views

I need to import a CSV file in Python on Windows. My file is delimited by ';' and has strings with non-English symbols and commas (','). I've read posts: Importing a CSV file into a sqlite3 ...
Alex Martian's user avatar
  • 3,920
12 votes
2 answers
6k views

Dask doesn't have a df.to_sql() like pandas and so I am trying to replicate the functionality and create an sql table using the map_partitions method to do so. Here is my code: import dask.dataframe ...
Ludo's user avatar
  • 2,577
5 votes
3 answers
8k views

It is possible export sqlite3 table to csv or xls format? I'm using python 2.7 and sqlite3.
Risino's user avatar
  • 361
6 votes
4 answers
11k views

I am reading a 800 Mb CSV file with pandas.read_csv, and then use the original Python pickle.dump(datfarame) to save it. The result is a 4 Gb pkl file, so the CSV size is multiplied by 5. I expected ...
Romain Jouin's user avatar
  • 4,898
2 votes
4 answers
14k views

Hi i am trying to import a csv file to a sqlite3 database using python tkinter. I open file using askopenfilename dialog and pass the file to readFile function. def csvFile(self): f1 = ...
Manish Gupta's user avatar
  • 4,676
6 votes
2 answers
27k views

I have a CSV file without headers and am trying to create a SQL table from certain columns in the file. I tried the solutions given here: Importing a CSV file into a sqlite3 database table using ...
user2483176's user avatar
4 votes
2 answers
10k views

I have a tab delimited file in the format: sentenceID (sid) documentID (scid) sentenceText (sent) E.g. 100004 100 即便您喜爱流连酒吧,也定然在这轻松安闲的一隅,来一场甜蜜沉醉的约会。 100005 100 您可以慢慢探究菜单上所有的秘密惊喜。 I want to ...
alvas's user avatar
  • 123k
6 votes
3 answers
6k views

I'm trying to simulate some code that I have working with SQL but using all Python instead.. With some help here CSV to Python Dictionary with all column names? I now can read my zipped-csv file into ...
dartdog's user avatar
  • 10.9k
4 votes
1 answer
18k views

I have written the following snippet to import a CSV file into an MS SQL Server database but it gives me an error. It is based on code written for Sqlite for Python and changed for MSSQL. import csv, ...
Illuminati's user avatar
8 votes
1 answer
3k views

I'm importing several CSV files into a single table. The documentation for CSV import says when the table already exists, every row of the CSV file, including the first row, is assumed to be actual ...
user2752467's user avatar
2 votes
2 answers
5k views

I have two csv files. one.csv: 1, 12.1455675, -13.1287564, 23, 9, 4.5, 4 2, 12.5934593, -13.0856385, 14, 5, 9.7, 6 3, 12.0496204, -13.8938582, 14, 6, 3.4, 9 4, 12.1456084, -12.1939589, 45, 2, 3.4, 8 ...
user2483176's user avatar

15 30 50 per page