Python Forum
read_csv error and rows/columns missing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
read_csv error and rows/columns missing
#2
  • zip file is corrupt
    to get list of files in directory, use:
    from pathlib import Path
    from tkinter import filedialog as fd
    
    def get_dir_file_list():
        fdir = Path(fd.askdirectory())
        fl = [fn for fn in fdir.iterdir() if fn.is_file()]
        return fl
    
    if __name__ == '__main__':
        filelist = get_dir_file_list()
        for filename in filelist:
            print(f"filename: {filename.name}")
Reply


Messages In This Thread
RE: read_csv error and rows/columns missing - by Larz60+ - Nov-05-2019, 03:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging rows and adding columns based on matching index pythonnewbie78 3 992 Dec-24-2023, 11:51 AM
Last Post: Pedroski55
  Pandas read_csv markf7319 0 1,341 Mar-03-2022, 04:59 AM
Last Post: markf7319
  groupby on var with missing values error zenvega 0 1,877 May-07-2021, 07:40 PM
Last Post: zenvega
  pandas read_csv can't handle missing data mrdominikku 0 2,617 Jul-09-2020, 12:26 PM
Last Post: mrdominikku
  Checking a filename before reading it with pd.read_csv karlito 2 2,309 Oct-30-2019, 09:46 AM
Last Post: karlito
  Drop rows if a set of columns has a value dervast 1 2,063 Sep-12-2019, 04:18 PM
Last Post: sd_0912
  display graph in columns and rows william888 1 1,928 Jul-02-2019, 10:19 AM
Last Post: dataman
  utf-8 error with pandas read_csv logues 0 3,954 Oct-23-2018, 05:25 PM
Last Post: logues
  Dropping all rows of multiple columns after the max of one cell Thunberd 2 3,049 Jun-01-2018, 10:18 PM
Last Post: Thunberd
  pandas read_csv, numbers in footer mechanic310 1 2,905 May-22-2018, 10:38 AM
Last Post: buran

Forum Jump:

User Panel Messages

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