probonopd / irdb

One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most accurate one
Other
851 stars 153 forks source link

fixed all CSV errors. #39

Closed Denneledoe closed 4 years ago

Denneledoe commented 4 years ago

removed unneeded commas, and all entries should be 5 frames wide.

had to do this by hand. it's not going to be perfect, but it should be compatible with something like Pandas now.

it seems there were too many commas generated, and some dataframes were 6, 7, or 8 frames wide, instead of 5.

probonopd commented 4 years ago

Thanks, but to be honest I am not sure whether there was something broken. Some protocols have more parameters than others.

What is Pandas?

Denneledoe commented 4 years ago

Pandas is a data science library for Python 3. you can read CSV with it, but for CSV to be valid, it has to be consistent on entries. it seems only 5 are ever needed: functionname protocol, device, subdevice, an function.

there were too many commas generated, which made the CSV invalid, as it sees the commas as frame separators, when there are more commas than you need, it adds frames to the CSV, it shouldn't do that, else the CSV will error out

Denneledoe commented 4 years ago

in short, with these CSV errors fixed, you can now automatically load the entire codes directory in using pandas, and other data science libraries

probonopd commented 4 years ago

Thanks for the explanation @Denneledoe

probonopd commented 4 years ago

Thank you very much for having taken the time to fix everything by hand @Denneledoe and thanks for reviewing @bengtmartensson

Denneledoe commented 4 years ago

haha, thanks @probonopd i just kept running it, seeing where it stopped, removing the commas there, and repeating that for the entire afternoon ;)

first time contributing open source

probonopd commented 4 years ago

Congratulations to your first open source contribution. Keep it up!