[Q] stream asyncio dataframes to_dataframe usage
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- pandas, python
- Ambito
- data-engineering, stream-processing
Direzione di ricerca
Start by reproducing the supplied coroutine using Stream.to_dataframe, source.emit(readField()), and sdf.tail(). Inspect the to_dataframe path and asynchronous emission behavior to determine why the resulting dataframe is empty. Done means the behavior is explained and, if it is a defect, covered by a focused regression test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hey guys,
Great work here, I just have a problem understanding how we translate a stream of dataframe so we can use tail() etc.
I have a coroutine, that emits dataframes to my stream.
from streamz import Stream
from tornado.ioloop import IOLoop
@gen.coroutine
def f():
source = Stream(asynchronous=True) # tell the stream we're working asynchronously
example = pd.DataFrame({'x': []})
sdf = source.to_dataframe(example=example)
for x in range(10):
yield gen.sleep(0.1)
yield source.emit(readField())
sdf.tail()
sdf.cumsum()
print(sdf)
IOLoop().run_sync(f)
with:
@asyncio.async
def readField():
"""
asynchronously - Blocking IO operation
"""
df = pd.DataFrame({'x': [SomeValues]})
return df
As output I get:
DataFrame - elements like:
Empty DataFrame
Columns: [x]
Index: []
I am not sure if thats the way we are looking to use the to_DataFrame.
I basically want to send my dataframes to a stream, translate it to bigger dataframes (window etc.) and perform some dynamic printing on the resulting frames. But somehow it seems, that my data is not transmitted to my stream.
Any idea/help would be appreciated.
- Lingua principale
- Python
- Stelle
- 1.3k
- Fork
- 149
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-streamz/streamz
-
pkg_resources warning Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
python-streamz/streamz#481 · 4 commenti ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
python-streamz/streamz#480 · 2 commenti ·
-
Compile the code into c++ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
python-streamz/streamz#479 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
python-streamz/streamz#478 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 10/100
python-streamz/streamz#476 · 17 commenti · 2 reazioni ·
Tutte le issue di python-streamz/streamz
Issue simili
-
triage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100