Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line code is failing to be parsed and evaluated properly #7

Closed
nischalshrestha opened this issue Oct 5, 2020 · 0 comments
Closed
Labels
bug Something isn't working priority woz

Comments

@nischalshrestha
Copy link
Owner

nischalshrestha commented Oct 5, 2020

I believe this was happening because of the hacky solution to get the "last expression/value" and should be updated with a more robust way to get that either via reticulate or python script.

Ex:

column_names = {'Date': 'date', 'Start (ET)': 'start',
  'Unamed: 2': 'box', 'Visitor/Neutral': 'away_team',
  'PTS': 'away_points', 'Home/Neutral': 'home_team',
  'PTS.1': 'home_points', 'Unamed: 7': 'n_ot'}
nba = (
  nba.rename(columns=column_names)
  .dropna(thresh=4)
  [['date', 'away_team', 'away_points', 'home_team', 'home_points']]
  .assign(date=lambda x: pd.to_datetime(x['date'], format='%a, %b %d, %Y'))
  .set_index('date', append=True)
  .rename_axis(["game_id", "date"])
  .sort_index()
)
nba
@nischalshrestha nischalshrestha added bug Something isn't working priority labels Dec 7, 2020
@nischalshrestha nischalshrestha moved this from To do to Today in Establish Features Dec 10, 2020
@nischalshrestha nischalshrestha moved this from Today to To do in Establish Features Dec 10, 2020
@nischalshrestha nischalshrestha moved this from To do to Hold Off in Establish Features Feb 14, 2021
Establish Features automation moved this from Hold Off to Done Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority woz
Projects
No open projects
Development

No branches or pull requests

1 participant