Giter Club home page Giter Club logo

Comments (1)

wesm avatar wesm commented on May 13, 2024

This can be done now in DataMatrix:

In [8]: dm
Out[8]: 
                       A           B           C           D           
2000-01-03 00:00:00    0.6304     -1.382      -0.242      -1.268      
2000-01-04 00:00:00    0.8243     -0.7684      0.177       0.8974     
2000-01-05 00:00:00    0.9411     -1.207       0.5106      0.9171     
2000-01-06 00:00:00   -2.778       0.9804     -0.4023      0.8694     
2000-01-07 00:00:00    0.09416    -0.4447     -1.29        0.9119     
2000-01-10 00:00:00    0.1413     -0.09031    -2.086       0.5024     
2000-01-11 00:00:00    0.1153     -0.6895     -0.06137     0.4239     
2000-01-12 00:00:00   -1.076      -1.304      -0.01166    -0.3801     
2000-01-13 00:00:00    0.5593     -0.8308     -1.671      -0.4757     
2000-01-14 00:00:00   -0.7621      0.04529     0.8069      0.2096     


In [9]: dm.xs(dm.index[5], copy=False)[:] = 10

In [10]: dm
Out[10]: 
                       A           B           C           D           
2000-01-03 00:00:00    0.6304     -1.382      -0.242      -1.268      
2000-01-04 00:00:00    0.8243     -0.7684      0.177       0.8974     
2000-01-05 00:00:00    0.9411     -1.207       0.5106      0.9171     
2000-01-06 00:00:00   -2.778       0.9804     -0.4023      0.8694     
2000-01-07 00:00:00    0.09416    -0.4447     -1.29        0.9119     
2000-01-10 00:00:00    10          10          10          10         
2000-01-11 00:00:00    0.1153     -0.6895     -0.06137     0.4239     
2000-01-12 00:00:00   -1.076      -1.304      -0.01166    -0.3801     
2000-01-13 00:00:00    0.5593     -0.8308     -1.671      -0.4757     
2000-01-14 00:00:00   -0.7621      0.04529     0.8069      0.2096     

Not possible (yet) in DataFrame, but on the todo list in the fancy indexing category

from pandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.