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

Fan Duel CSV Upload #197

Closed
Jzilllah opened this issue Sep 13, 2022 · 5 comments
Closed

Fan Duel CSV Upload #197

Jzilllah opened this issue Sep 13, 2022 · 5 comments

Comments

@Jzilllah
Copy link

Very new to coding here, so this may be a simple issue, but im having trouble importing Fan duel CSV.

Here is the error im getting:

Screenshot (261)

@BenBrostoff
Copy link
Owner

Can you attach the CSV you're attempting to ingest? It looks like the header doesn't have Position as a column name.

@Jzilllah
Copy link
Author

Jzilllah commented Sep 14, 2022

both csv's i used appear to have position.

I used the below sheet for this attempt:

FDweek2.csv

I read in a previous comment that it hasnt been designed for the lineup build csv so i also tried with this version and got a different error. I have attached that below as well.

fdplayersweek2.csv

Screenshot (262)

I'll keep trying things out to see if I can fix it it may just be a simple error that i'm missing.

Thanks,
J

@BenBrostoff
Copy link
Owner

I think you need to invoke game with either DRAFT_KINGS or FAN_DUEL - generate_players_from_csv expects a str instead of a Ruleset. You can see an example here

def test_nfl_fd():
players = salary_download.generate_players_from_csvs(
salary_file_location=fd_nfl_salary_file,
game=rules.FAN_DUEL,
)
roster = run(
rule_set=rules.FD_NFL_RULE_SET,
player_pool=players,
verbose=True
)
ntools.assert_not_equal(roster, None)
ntools.assert_equal(roster.projected(), 155.0172712846236)

@ramGoli
Copy link

ramGoli commented Sep 14, 2022 via email

@Jzilllah
Copy link
Author

It worked. Thank y'all so much! Will likely have more questions as I work to build my tests out, greatly appreciate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants