Skip to content

Import extra_fields #25

@takumi-miyajima

Description

@takumi-miyajima

Is your feature request related to a problem? Please describe.
Cannot use extra_fields functionality as documented.

Describe the solution you'd like
I would like to be able to use extra_fields when working with CSV data, allowing access to additional columns beyond the standard OHLCV data.

"""
@pyne
"""

from pynecore.lib import ta, Series, close, extra_fields

def main():
    some_price: Series[float] = extra_fields["some_price"]
    realtime_some_price = some_price[0]
    confirmed_some_price = some_price[1]
    some_price_ma = ta.sma(some_price, 7)

    some_flag: Series[bool] = extra_fields["some_flag"]
    ...

Describe alternatives you've considered
Currently using the volume column as a workaround (though it's limited to integers float only).

Additional context
Thank you for creating such an excellent library.
This feature would greatly enhance the flexibility of CSV data processing workflows.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions