<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Alex,</div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-22 12:45 GMT+01:00 Alex Rogozhnikov <span dir="ltr"><<a href="mailto:alex.rogozhnikov@yandex.ru" target="_blank">alex.rogozhnikov@yandex.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Nathaniel, </div><div><br></div><div><br></div><div><blockquote type="cite"><div dir="auto"><div dir="auto">pandas</div></div></blockquote><br></div><div>yup, the idea was to have minimal pandas.DataFrame-like storage (which I was using for a long time), </div><div>but without irritating problems with its row indexing and some other problems like interaction with matplotlib.</div><div><br></div><div><div><blockquote type="cite"><div dir="auto"><div dir="auto">A dict of arrays?</div></div></blockquote></div><div><br></div><div>that's what I've started from and implemented, but at some point I decided that I'm reinventing the wheel and numpy has something already. In principle, I can ignore this 'column-oriented' storage requirement, but potentially it may turn out to be quite slow-ish if dtype's size is large.</div></div><div><br></div><div>Suggestions are welcome.</div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​You may want to try bcolz:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://github.com/Blosc/bcolz">https://github.com/Blosc/bcolz</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">bcolz is a columnar storage, basically as you require, but data is compressed by default even when stored in-memory (although you can disable compression if you want to).​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Another strange question:</div><div>in general, it is considered that once numpy.array is created, it's shape not changed. </div><div>But if i want to keep the same recarray and change it's dtype and/or shape, is there a way to do this?</div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​You can change shapes of numpy arrays, but that usually involves copies of the whole container.  With bcolz you can change length and add/del columns without copies.​  If your containers are large, it is better to inform bcolz on its final estimated size.  See:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><a href="http://bcolz.blosc.org/en/latest/opt-tips.html">http://bcolz.blosc.org/en/latest/opt-tips.html</a></font><br></div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Francesc​</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Thanks, </div><div>Alex.</div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite"><div>22 февр. 2017 г., в 3:53, Nathaniel Smith <<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>> написал(а):</div><br class="gmail-m_2817944884559285036Apple-interchange-newline"><div><div><div class="gmail-h5"><div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Feb 21, 2017 3:24 PM, "Alex Rogozhnikov" <<a href="mailto:alex.rogozhnikov@yandex.ru" target="_blank">alex.rogozhnikov@yandex.ru</a>> wrote:<br type="attribution"><blockquote class="gmail-m_2817944884559285036quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>Ah, got it. Thanks, Chris!</div><div>I thought recarray can be only one-dimensional (like tables with named columns).</div><div><br></div><div>Maybe it's better to ask directly what I was looking for: </div><div>something that works like a table with named columns (but no labelling for rows), and keeps data (of different dtypes) in a column-by-column way (and this is numpy, not pandas). </div><div><br></div><div>Is there such a magic thing?</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Well, that's what pandas is for...</div><div dir="auto"><br></div><div dir="auto">A dict of arrays?</div><div dir="auto"><br></div><div dir="auto">-n</div></div></div></div><span class="gmail-">
______________________________<wbr>_________________<br>NumPy-Discussion mailing list<br><a href="mailto:NumPy-Discussion@scipy.org" target="_blank">NumPy-Discussion@scipy.org</a><br><a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br></span></div></blockquote></div><br></div><br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Francesc Alted</div>
</div></div>