Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Querying cvs excel files
#1
Hi all,

I would like to find out how I could do query in csv excel file row by row. I don't want to use panda. If anyone know how to do it please share.

The code below does not find out the existing usernames and passwords in the file. When I open the file I can see the password and username that I am querying is there there but python cannot see it.

thanks.
        with open('Usernames_Passwords.csv', newline='') as myFile:  
            reader = csv.reader(myFile)
            for row in reader:
                if row==username and row==password:
                    print("Walid Username and Passwrod")
                else:
                    print("Wrong Inputs")
Reply


Messages In This Thread
Querying cvs excel files - by rturus - Mar-21-2019, 04:22 PM
RE: Querying cvs excel files - by ichabod801 - Mar-21-2019, 06:28 PM
RE: Querying cvs excel files - by rturus - Mar-26-2019, 10:37 AM
RE: Querying cvs excel files - by ichabod801 - Mar-26-2019, 03:24 PM
RE: Querying cvs excel files - by rturus - Mar-27-2019, 01:25 PM
RE: Querying cvs excel files - by perfringo - Mar-27-2019, 01:57 PM
RE: Querying cvs excel files - by ichabod801 - Mar-27-2019, 02:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Copy Paste excel files based on the first letters of the file name Viento 2 473 Feb-07-2024, 12:24 PM
Last Post: Viento
  How to loop through all excel files and sheets in folder jadelola 1 4,553 Dec-01-2022, 06:12 PM
Last Post: deanhystad
  Basic SQL query using Py: Inserting or querying sqlite3 database not returning data marlonbown 3 1,406 Nov-08-2022, 07:16 PM
Last Post: marlonbown
  Creating csv files from Excel file azizrasul 40 5,865 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  Working with excel files arsouzaesilva 6 3,224 Sep-17-2021, 06:52 PM
Last Post: arsouzaesilva
  win32com — How to resolve “AttributeError: xlUp” for Excel files? JaneTan 2 4,278 Aug-18-2021, 05:27 AM
Last Post: snippsat
  code to read files in folders and transfer the file name, type, date created to excel Divya577 0 1,875 Dec-06-2020, 04:14 PM
Last Post: Divya577
  Creating Excel files compatible with microsoft access vkallavi 0 1,604 Sep-17-2020, 06:57 PM
Last Post: vkallavi
  Merging Excel Files JezMim 1 1,914 Sep-06-2020, 08:56 PM
Last Post: bowlofred
  Fastest Method for Querying SQL Server with Python Pandas BuJayBelvin 7 6,961 Aug-02-2020, 06:21 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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