Python Forum
[SOLVED] [sqilte3] Check if column not empty?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] [sqilte3] Check if column not empty?
#2
Untested, but what about checking that row returns True?

for row in cur.execute("select id,introtext,fulltext from content"):
    if row:
        soup = BeautifulSoup(row["introtext"], 'lxml')
        file.write(soup.body.text)
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
RE: [sqilte3] Check if column not empty? - by rob101 - Jan-28-2023, 04:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [solved] list content check paul18fr 6 834 Jan-04-2024, 11:32 AM
Last Post: deanhystad
  Delete empty text files [SOLVED] AlphaInc 5 1,644 Jul-09-2022, 02:15 PM
Last Post: DeaD_EyE
  Check if clients are online with ips stored in json [SOLVED] AlphaInc 6 2,613 Jun-27-2022, 08:28 AM
Last Post: AlphaInc
  [Solved] Reading every nth line into a column from txt file Laplace12 7 5,334 Jun-29-2021, 09:17 AM
Last Post: Laplace12
  Python Openpyxl is unable to check from Column 6 onwards Skye 0 1,758 Oct-13-2020, 06:11 AM
Last Post: Skye
  write to excel will be empty in column jacklee26 7 3,462 Jun-27-2020, 12:09 AM
Last Post: snippsat
  Check for a special characters in a column and flag it ayomayam 0 2,088 Feb-12-2020, 03:04 PM
Last Post: ayomayam
  How to get previous non empty value of another column klllmmm 1 1,853 Feb-02-2020, 12:22 PM
Last Post: klllmmm
  find empty cells in a column Pedroski55 2 23,905 Sep-18-2017, 01:27 PM
Last Post: Pedroski55
  How to check if the data is empty in a database? chris0147 8 20,480 Aug-28-2017, 12:03 AM
Last Post: Fran_3

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020