Giter Site home page Giter Site logo

Comments (1)

alecglen avatar alecglen commented on June 3, 2024

Hi @stranger9977, it appears the data is present in the repo as intended.

In: pd.merge(
    ...:     nfl.import_rosters([2022]),
    ...:     nfl.import_seasonal_data([2022]),
    ...:     on=['season', 'player_id']
    ...: ).query('player_name == "Drake London"')

Out: 
    season team position depth_chart_position  jersey_number  status   player_name first_name last_name birth_date  height  weight college  ... games    tgt_sh     ay_sh    yac_sh    wopr_y     ry_sh    rtd_sh    rfd_sh  rtdfd_sh      dom     w8dom    yptmpa    ppr_sh
40    2022  ATL       WR                   WR            5.0  Active  Drake London      Drake    London 2001-07-24    76.0   210.0    None  ...    17  0.281928  0.300521  0.187958  0.663308  0.295866  0.235294  0.324324  0.315152  0.26558  0.283752  2.086747  0.149509

[1 rows x 92 columns]

The problem is in your line stats['season'] = stats['season'] +1. I'm not sure what your intention was exactly, but doing that sets London's one year of seasonal_data as if it happened in 2023 instead of 2022. Since there is no 2023 roster data published yet, your pd.merge with how='inner' filters London out since there are no records that align on season.

Hope this helps! Feel free to ask any follow-up questions.

from nfl_data_py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.