Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 653

Messy CSV auto header extractor [closed]

$
0
0

I have a bunch (100+) CSV files. Each of them can have blank rows, or rows I don't need (Some fuzz info like "Congrats, you all bla bla"). When reading in Pandas I need to specify which row is the header row. It's a lot of work to do with multiple files. Keep in mind that all files are of different format.

Currently I iterate over all rows and just check if all cells in a row are strings and select that one as a header.

I need a better function to compress list of strings into a single confidence score (so that I can see what row is header with the highest probability)

Could you please help me out?


Viewing all articles
Browse latest Browse all 653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>