I have a script that is iterating through two specific columns in an excel file and capturing the Item ID and the Item Value in to a dictionary.
The problem I am having it that the Item IDs are floats and Python treats 1.1 the same as it would 1.10
The Item IDs are as follows:
1.1 -=> this one is problematic with 1.10
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
It then continues to the 2.x series
2.1 -=> this is treated the same as 2.10
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
2.12
I have tried to se them as strings to make them different from each other but that does not appear to work.
The final output form the date I compile is an excel file with the following columns:
filename item_id item_value
Currently it treats 1.1 any 1.10 as 1.10 in excel - I need them to be distinct...
Anyone have any recommendations no how best to handle this?
1.1 === 1.10. If you are trying to keep them as distinct, then just transform them into strings, and focus more on the problem with why that isn't working for you by showing us your code.