Given multiple two columns sets of a min/max how to return index if a number falls between min/max

My input CSV looks like this

Tier    | A   |     | B   |     | C   |            | Min | Max | Min | Max | Min | Max 1       | 0   | .5  | 0   | .25 | 0   | .92 2       |.51  | 1.0 | .26 | .50 | .93 | 1.5 

Given an input dictionary {A: .56, B: .22, C: .99} I want to return {A: 2, B: 1, C: 2}, the tiers corresponding to where the number is within the range.

My problem is that I'm not sure how to read the header into a multi-index, or even if its worth bothering.

Currently what I've tried is zipping the columns every other and then turning those into one column tuples, storing the tuples under every set of min/max per "A B C" set. But this doesn't seem like the best way to do this, any tips?

Replay

Category: python Time: 2016-07-29 Views: 0
Tags: python pandas

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.224 (s). 12 q(s)