View Active Threads
View Today's Posts
Home
Forums
View New Posts
View Today's Posts
My Discussions
Unanswered Posts
Unread Posts
Active Threads
Mark all forums read
Staff List
Member List
Help
Calendar
Search
Statistics
Interpreter
IRC
from .txt to database
Python Forum
General
News and Discussions
Thread Rating:
0 Vote(s) - 0 Average
1
2
3
4
5
Thread Modes
from .txt to database
myp1lteandroid
Unladen Swallow
Posts:
1
Threads:
1
Joined:
Mar 2019
Reputation:
0
#1
Mar-28-2019, 10:26 PM
I have a .txt file (the content are from one data type say it is numerical) and I want to open this file using Python then read its content and then put its content in MySQL database is this possible and how?
Reply
Find
Reply
Yoriz
Posts:
2,165
Threads:
35
Joined:
Sep 2016
Reputation:
192
#2
Mar-28-2019, 10:36 PM
Reading and writting files
https://dev.mysql.com/doc/connector-python/en/
using BBCode
|
How to ask Smart Questions
|
What to include
|
What NOT to include
|
Homework/No Effort posts
Reply
Find
Reply
Defonds
Unladen Swallow
Posts:
2
Threads:
0
Joined:
Apr 2019
Reputation:
0
#3
Apr-09-2019, 06:17 AM
I think you can read the .txt file first, parse all content to data in memory, and finally write it to MySQL database.
Reply
Find
Reply
Users browsing this thread: 1 Guest(s)
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
Python Coding
-- General Coding Help
-- Data Science
-- Homework
-- GUI
-- Game Development
-- Networking
-- Web Scraping & Web Development
General
-- News and Discussions
-- Tutorials
---- Tutorial Requests and Submissions
---- Python Installation and Execution
---- Fundamentals
---- Common pitfalls and what to do
---- Web Scraping
---- Web Tutorials
---- GUI tutorials
---- Game Tutorials
---- Networking Tutorials
-- Code sharing
-- Code Review
-- Jobs
Forum & Off Topic
-- Board
---- Weekly Top Picks
-- Bar
User Panel
Messages
Log Out
My Profile
Pay your profile a visit
User Control Panel
Do some changes on your profile
My Messages
View private messages
unread
Avatar
Change avatar
Signature
Change signature
Announcements
Announcement #1
8/1/2020
Announcement #2
8/2/2020
Announcement #3
8/6/2020
Login to Python Forum
Enter your details to login to your account:
Remember me
Lost Password?
Login
Don't have an account yet?
Sign Up!
Linear Mode
Threaded Mode