Skip to content
Snippets Groups Projects
Commit 269ec3e7 authored by Junhao Zhou's avatar Junhao Zhou
Browse files

Deleted Untitled-1.ipynb

parent 2a598e28
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
import pandas as pd
```
%% Cell type:code id: tags:
``` python
df=pd.read_csv('Meteorite_Landings.csv')
df.head()
```
%% Output
name id nametype recclass mass (g) fall year reclat \
0 Aachen 1 Valid L5 21.0 Fell 1880.0 50.77500
1 Aarhus 2 Valid H6 720.0 Fell 1951.0 56.18333
2 Abee 6 Valid EH4 107000.0 Fell 1952.0 54.21667
3 Acapulco 10 Valid Acapulcoite 1914.0 Fell 1976.0 16.88333
4 Achiras 370 Valid L6 780.0 Fell 1902.0 -33.16667
reclong GeoLocation
0 6.08333 (50.775, 6.08333)
1 10.23333 (56.18333, 10.23333)
2 -113.00000 (54.21667, -113.0)
3 -99.90000 (16.88333, -99.9)
4 -64.95000 (-33.16667, -64.95)
%% Cell type:code id: tags:
``` python
df.nlargest(20, 'mass (g)')
```
%% Output
name id nametype recclass mass (g) fall \
16392 Hoba 11890 Valid Iron, IVB 60000000.0 Found
5373 Cape York 5262 Valid Iron, IIIAB 58200000.0 Found
5365 Campo del Cielo 5247 Valid Iron, IAB-MG 50000000.0 Found
5370 Canyon Diablo 5257 Valid Iron, IAB-MG 30000000.0 Found
3455 Armanty 2335 Valid Iron, IIIE 28000000.0 Found
12613 Gibeon 10912 Valid Iron, IVA 26000000.0 Found
5468 Chupaderos 5363 Valid Iron, IIIAB 24300000.0 Found
26297 Mundrabilla 16852 Valid Iron, IAB-ung 24000000.0 Found
920 Sikhote-Alin 23593 Valid Iron, IIAB 23000000.0 Fell
5016 Bacubirito 4919 Valid Iron, ungrouped 22000000.0 Found
22921 Mbosi 15456 Valid Iron, ungrouped 16000000.0 Found
38317 Willamette 24269 Valid Iron, IIIAB 15500000.0 Found
26174 Morito 16745 Valid Iron, IIIAB 10100000.0 Found
26338 Nantan 16906 Valid Iron, IAB-MG 9500000.0 Found
5613 Cranbourne 5463 Valid Iron, IAB-MG 8600000.0 Found
36882 Santa Catharina 23162 Valid Iron, IAB-ung 7000000.0 Found
5083 Bendegó 5015 Valid Iron, IC 5360000.0 Found
5201 Brenham 5136 Valid Pallasite, PMG-an 4300000.0 Found
419 Jilin 12171 Valid H5 4000000.0 Fell
38206 Vaca Muerta 24142 Valid Mesosiderite-A1 3828000.0 Found
year reclat reclong GeoLocation
16392 1920.0 -19.58333 17.91667 (-19.58333, 17.91667)
5373 1818.0 76.13333 -64.93333 (76.13333, -64.93333)
5365 1575.0 -27.46667 -60.58333 (-27.46667, -60.58333)
5370 1891.0 35.05000 -111.03333 (35.05, -111.03333)
3455 1898.0 47.00000 88.00000 (47.0, 88.0)
12613 1836.0 -25.50000 18.00000 (-25.5, 18.0)
5468 1852.0 27.00000 -105.10000 (27.0, -105.1)
26297 1911.0 -30.78333 127.55000 (-30.78333, 127.55)
920 1947.0 46.16000 134.65333 (46.16, 134.65333)
5016 1863.0 26.20000 -107.83333 (26.2, -107.83333)
22921 1930.0 -9.11667 33.06667 (-9.11667, 33.06667)
38317 1902.0 45.36667 -122.58333 (45.36667, -122.58333)
26174 1600.0 27.05000 -105.43333 (27.05, -105.43333)
26338 1958.0 25.10000 107.70000 (25.1, 107.7)
5613 1854.0 -38.10000 145.30000 (-38.1, 145.3)
36882 1875.0 -26.21667 -48.60000 (-26.21667, -48.6)
5083 1784.0 -10.11667 -39.20000 (-10.11667, -39.2)
5201 1882.0 37.58250 -99.16361 (37.5825, -99.16361)
419 1976.0 44.05000 126.16667 (44.05, 126.16667)
38206 1861.0 -25.75000 -70.50000 (-25.75, -70.5)
%% Cell type:code id: tags:
``` python
def inputmeteor():
name = input("Enter the name of the meteor: ")
mass = input("Enter the mass of the meteor: ")
year = input("Enter the year of the meteor: ")
id = input("Enter the id of the meteor: ")
recclass = input("Enter the recclass of the meteor: ")
reclat = input("Enter the reclat of the meteor: ")
reclong = input("Enter the reclong of the meteor: ")
geolocation = input("Enter the geolocation of the meteor: ")
fall = input("Enter the fall of the meteor(Fell/Found): ")
newmeteor= dict(name=name,id=id,recclass=recclass,mass=mass,fall=fall,year=year,reclat=reclat,reclong=reclong,geolocation=geolocation)
return newmeteor
```
%% Cell type:code id: tags:
``` python
new_row = inputmeteor()
df = df.append(new_row, ignore_index=True)
# 将更新后的数据表保存到CSV文件中
df.to_csv("Meteorite_Landings.csv", index=False)
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment