streamz icon indicating copy to clipboard operation
streamz copied to clipboard

how can we just convert streamz.dataframe into a normal dataframe?

Open fs-rd-anish-dey opened this issue 7 years ago • 2 comments

i have this sdf

from streamz import Stream

source = Stream.filenames('~/jupyter/streams/csv/*.csv', poll_interval=0.1)
source.start()
example = pd.DataFrame({'cnt': [], 'word': []})
sdf = source.map(pd.read_csv).to_dataframe(example=example)
sdf

I just want to visualize it normally like I can do for a normal pandaz dataframe. Any help for visualizing the above sdf(example below) into a bar graph will be immensely helpful

|cnt|word|
+---+----+
|  3|   9|
|  1|   1|
|  1|   5|
|  3|   7|
|  3|  10|
|  3|   6|
|  2|   4|
|  2|   8|
+---+----+

fs-rd-anish-dey avatar Jun 05 '18 07:06 fs-rd-anish-dey

My sense is that this would make more sense after we added support for stop or end-of-stream signals. I'm not sure how to accomplish this cleanly before then.

On Tue, Jun 5, 2018 at 3:32 AM, fs-rd-anish-dey [email protected] wrote:

i have this sdf

from streamz import Stream

source = Stream.filenames('~/jupyter/streams/csv/*.csv', poll_interval=0.1) source.start() example = pd.DataFrame({'cnt': [], 'word': []}) sdf = source.map(pd.read_csv).to_dataframe(example=example) sdf

I just want to visualize it normally like I can do for a normal pandaz dataframe. Any help for visualizing the above sdf(example below) into a bar graph will be immensely helpful

|cnt|word| +---+----+ | 3| 9| | 1| 1| | 1| 5| | 3| 7| | 3| 10| | 3| 6| | 2| 4| | 2| 8| +---+----+

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrocklin/streamz/issues/183, or mute the thread https://github.com/notifications/unsubscribe-auth/AASszGFkZAVeJabEHYHNlIAECJ5JwduMks5t5jPxgaJpZM4UaSyY .

mrocklin avatar Jun 05 '18 13:06 mrocklin

Could we have a crude end-of-stream via a collect?

CJ-Wright avatar Jun 05 '18 14:06 CJ-Wright