Comments (2)
Alright, so I wrote a python script for the first one that doesn't use the API, the reason being that the objects returned by the GET responses don't seem to allow collections of moves/pokemon. Ultimately chaining these requests together would be optimal to find outputs that are unique to specially-trained teams. I still use the _CSV_ files, however, as they and pandas were key to this script.
import pandas as pd
# retrieve move ids from crit rates
a = open('move_meta.csv')
av = pd.read_csv(a)
av = av[['move_id','crit_rate']]
av = av[(av['crit_rate'] > 0)]
av = av['move_id'].tolist()
# retrieve move id from move identifier
b = open('moves.csv')
bv = pd.read_csv(b)
fz = bv
bv = bv[['id','identifier']]
bv = bv[(bv['identifier'] == 'skill-swap')]
bv = bv['id'].tolist()
# retrieve pokemon id from move id
c = open('pokemon_moves.csv')
cv = pd.read_csv(c)
cv = cv[['pokemon_id','move_id']]
cv = cv[(cv['move_id'] == bv)]
cv = cv.drop_duplicates(cols='pokemon_id')
cv = cv['pokemon_id'].tolist()
# retrieve pokemon ids from move ids
d = open('pokemon_moves.csv')
dv = pd.read_csv(d)
dv = dv[['pokemon_id','move_id']]
dv = dv[(dv['move_id'].isin(av))]
# retrieve pokemon that know skill swap as well
dv = dv[(dv['pokemon_id'].isin(cv))]
dv = dv.drop_duplicates(cols=['pokemon_id', 'move_id'])
# retrieve pokemon identifiers and move identifiers
# first pokemon identifiers
e = open('pokemon.csv')
ey = pd.read_csv(e)
ey = ey[['id','identifier']]
ey = ey.set_index('id')['identifier'].to_dict()
ey = dv.replace({'pokemon_id': ey})
# second move identifiers
fz = fz[['id','identifier']]
fz = fz.set_index('id')['identifier'].to_dict()
fz = ey.replace({'move_id': fz})
final = fz
final.columns = ['Pokemon','Move']
final = final.set_index('Pokemon')
final.to_html('finalfile.html')
print final
# print fz
# print ey
# print dv
# print dv
# print cv
# print bv
# print av
from pokeapi.
Sorry No one has ever gotten back to you on this issue. Honestly I've looked over what you've posted and I'm not 100% sure exactly what your issue is. Is this still something concerning you? I'd like to help if I can
from pokeapi.
Related Issues (20)
- GraphQL server is down HOT 4
- Linking cord from PLA. HOT 8
- Requirements for a V3(beta) HOT 13
- Pokemon Color Routing Issue HOT 2
- Types endpoint not returning values from Pokemon 19 onwards. HOT 2
- French Encounter Method name is returned 3 times HOT 2
- Duplicate entry for Malie-City in locations.csv HOT 2
- Anorith/Lileep missing in Encounter HOT 1
- Seeking feedback before overhauling items HOT 1
- Server is down HOT 1
- Missing version names for the gen 9 dlcs HOT 1
- Ability by effects HOT 3
- Moves after #748 return Not Found HOT 5
- HGSS Vermilion City/S.S. Anne dock missing swarm conditions HOT 2
- CORS error after few days HOT 7
- Pokémon's highest and lowest stats. HOT 4
- make build-db isn't working HOT 4
- Cannot fetch Mega-Garchomp data HOT 6
- Encounters seem incomplete for gen3, missing npc trades
- GraphQL vs REST API sprite response differing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokeapi.