-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathto_dataframe.py
50 lines (44 loc) · 878 Bytes
/
to_dataframe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import pandas as pd
data = [
[
"\"Festerleech\"",
1,
"\"Creature - Zombie Leech\"",
"B",
"\"mkm\"",
"\"85\"",
"uncommon",
"b",
"Owned",
"",
"",
"",
"\"\"",
"\"\"",
121648
],
[
"\"Urborg Scavengers\"",
3,
"\"Creature - Spirit\"",
"B",
"\"mat\"",
"\"15\"",
"rare",
"b",
"Owned",
"Foil",
"",
"",
"\"\"",
"\"\"",
109152
]
]
# Convert the data into a DataFrame
df = pd.DataFrame(data)
# Define column names
column_names = ["name", "CMC", "Type", "Color", "Set", "Collector Number", "Rarity", "Color Category", "status", "Finish", "maybeboard", "image URL", "tags", "Notes", "MTGO ID"]
# Label the DataFrame columns
df.columns = column_names
print(df)