- Import the contents of "planets.csv" into a pandas DataFrame.
- Convert any dates contained in strings to a datetime data format.
- Write the pandas necessary to show only the planets with a magnetic field
- Count how many months passed between when we first visited the Moon and Mars.
- Show the planets that have moons
- Show the planets that have rings
- Show planets with a day that is shorter than or equal to Earth's 24 hours.
- What is the mean temperature of all the planets together?
- What is the hottest planet? Determine this programmatically.
- What is the coldest planet? Determine this programmatically.
- What planet has the most moons?
Created
August 20, 2019 14:47
-
-
Save ryanorsinger/097d7a0ee8e2038a1543be65c8675114 to your computer and use it in GitHub Desktop.
Pandas Warmups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Planet | Mass | Diameter | DayLength | SunDistance | OrbitPeriod | OrbitVelocity | MeanTemperature | SurfacePressure | Moons | Rings | MagneticField | FirstVisited | FirstMission | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MERCURY | 0.33 | 4879 | 4222.6 | 57.9 | 88 | 47.4 | 167 | 0 | 0 | No | Yes | 1974-03-29 | Mariner 10 | |
VENUS | 4.87 | 12,104 | 2802 | 108.2 | 224.7 | 35 | 464 | 92 | 0 | No | No | 1962-08-27 | Mariner 2 | |
EARTH | 5.97 | 12,756 | 24 | 149.6 | 365.2 | 29.8 | 15 | 1 | 1 | No | Yes | NA | NA | |
MOON | 0.073 | 3475 | 708.7 | NA | 27.3 | 1 | -20 | 0 | 0 | No | No | 1959-09-12 | Luna 2 | |
MARS | 0.642 | 6792 | 24.7 | 227.9 | 687 | 24.1 | -65 | 0.01 | 2 | No | No | 1965-07-15 | Mariner 4 | |
JUPITER | 1898 | 142,984 | 9.9 | 778.6 | 4331 | 13.1 | -110 | NA | 67 | Yes | Yes | 1973-12-04 | Pioneer 10 | |
SATURN | 568 | 120,536 | 10.7 | 1433.5 | 10,747 | 9.7 | -140 | NA | 62 | Yes | Yes | 1979-09-01 | Pioneer 11 | |
URANUS | 86.8 | 51,118 | 17.2 | 2872.5 | 30,589 | 6.8 | -195 | NA | 27 | Yes | Yes | 1986-01-24 | Voyager 2 | |
NEPTUNE | 102 | 49,528 | 16.1 | 4495.1 | 59,800 | 5.4 | -200 | NA | 14 | Yes | Yes | 1989-08-25 | Voyager 2 | |
PLUTO | 0.0146 | 2370 | 153.3 | 5906.4 | 90,560 | 4.7 | -225 | 0.00001 | 5 | No | NA | 2015-07-14 | New Horizons |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment