Linked Questions
44 questions linked to/from Importing a CSV file into a sqlite3 database table using Python
-1
votes
1
answer
2k
views
Manage data from .txt file to store it to SQLite3 in Python [duplicate]
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 ...
0
votes
1
answer
171
views
How to import csv or json file into the model & create taboe for that data [duplicate]
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 ...
0
votes
0
answers
39
views
Is there Python code to write directly into a SQLite command line? [duplicate]
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 ...
32
votes
4
answers
62k
views
Bulk insert huge data into SQLite using Python
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 ...
14
votes
5
answers
39k
views
Python import CSV short code (pandas?) delimited with ';' and ',' in entires
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 ...
12
votes
2
answers
6k
views
Create sql table from dask dataframe using map_partitions and pd.df.to_sql
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 ...
5
votes
3
answers
8k
views
It is possible export table sqlite3 table to csv or similiar?
It is possible export sqlite3 table to csv or xls format? I'm using python 2.7 and sqlite3.
6
votes
4
answers
11k
views
Pickling pandas dataframe multiplies by 5 the file size
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 ...
2
votes
4
answers
14k
views
python import csv to sqlite
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 = ...
6
votes
2
answers
27k
views
Python, converting CSV file to SQL table
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 ...
4
votes
2
answers
10k
views
How to put a textfile into sqlite simply using Python API?
I have a tab delimited file in the format:
sentenceID (sid) documentID (scid) sentenceText (sent)
E.g.
100004 100 即便您喜爱流连酒吧,也定然在这轻松安闲的一隅,来一场甜蜜沉醉的约会。
100005 100 您可以慢慢探究菜单上所有的秘密惊喜。
I want to ...
6
votes
3
answers
6k
views
Python in memory table data structures for analysis (dict, list, combo)
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 ...
4
votes
1
answer
18k
views
pyodbc.DataError: ('22018',"[22018] [Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed ] error
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, ...
8
votes
1
answer
3k
views
How do I use the SQLite CLI's "--skip 1" option?
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 ...
2
votes
2
answers
5k
views
Matching data from two csv files based on two columns and creating a new csv file with selected columns
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
...