Pretty confused about this.
If possible could someone give a step-by-step process of how to solve this?
Justin Robbins wrote:I have a CSV file with several types of data. One column is all doubles, the other all ints, and the remaining are all strings.
OK, well that sounds wrong right there.
What are they? What data do they represent? What do you mean by "the median"?
I understand in the math world, the median is when you find the "middle number". So for the columns they are unsorted, so first I'll need some way of sorting the columns from least to greatest.
Which again we can't really help you with unless we know more about what we (or actually you) are talking about.
Also, what if the column is even or odd? If it's even, then somehow the code must take two middle numbers and divides that by two?
That's generally only an issue when whatever the "value" you're counting is numeric - and it doesn't have to be.
For example, the "median state" in the US for income, based on some sample you take, could be either "Illinois" or "Maryland", but there's no way to decide between them, since exactly half of your sample lies in the bottom half topped by Illinois, and the top half is "bottomed" by Maryland.
You can't have "Illiois.5".
Tell us more about this file and exactly what it contains, and then we'll be able to help you better.