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

Get multiple series #42

Open
katsuya-horiuchi opened this issue May 29, 2021 · 3 comments
Open

Get multiple series #42

katsuya-horiuchi opened this issue May 29, 2021 · 3 comments

Comments

@katsuya-horiuchi
Copy link

If you want to get multiple series in dataframe, you have to do something like this:

df = pd.DataFrame()
for series in ['VIXCLS', 'SP500']:
    s = fred.get_series(series)
    s.name = series
    df = df.join(s, how='outer')

I wonder if we can add a method to allow you to get multiple series at once.
Noticed there's a PR (#15), but seemed like it contains more than one changes.

@AhmedThahir
Copy link

Any updates?

@Liam3851
Copy link

This is really clean and easy with a dictionary comprehension:

df = pd.DataFrame({series:fred.get_series(series) for series in ['VIXCLS', 'SP500']})

@AhmedThahir
Copy link

Is there a way to list all names of all series in the fred database?

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