<p dir="auto">When running</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    import pandas as pd
    index = pd.date_range('1/1/2000', periods=9, freq='0.9S')
    series = pd.Series(range(9), index=index)
    
    &gt;&gt;&gt; series
    2000-01-01 00:00:00.000    0
    2000-01-01 00:00:00.900    1
    2000-01-01 00:00:01.800    2
    2000-01-01 00:00:02.700    3
    2000-01-01 00:00:03.600    4
    2000-01-01 00:00:04.500    5
    2000-01-01 00:00:05.400    6
    2000-01-01 00:00:06.300    7
    2000-01-01 00:00:07.200    8
    Freq: 900L, dtype: int64"><pre class="notranslate">    <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
    <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'1/1/2000'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">9</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'0.9S'</span>)
    <span class="pl-s1">series</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-en">range</span>(<span class="pl-c1">9</span>), <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>)
    
    <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">series</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.000</span>    <span class="pl-c1">0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.900</span>    <span class="pl-c1">1</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">01.800</span>    <span class="pl-c1">2</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">02.700</span>    <span class="pl-c1">3</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">03.600</span>    <span class="pl-c1">4</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">04.500</span>    <span class="pl-c1">5</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">05.400</span>    <span class="pl-c1">6</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">06.300</span>    <span class="pl-c1">7</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">07.200</span>    <span class="pl-c1">8</span>
    <span class="pl-v">Freq</span>: <span class="pl-c1">900L</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<p dir="auto">I get</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    &gt;&gt;&gt; series.resample(rule='0.5S').head(100)
    2000-01-01 00:00:00.000    0.0
    2000-01-01 00:00:00.500    1.0
    2000-01-01 00:00:01.000    NaN
    2000-01-01 00:00:01.500    2.0
    2000-01-01 00:00:02.000    NaN
    2000-01-01 00:00:02.500    3.0
    2000-01-01 00:00:03.000    NaN
    2000-01-01 00:00:03.500    4.0
    2000-01-01 00:00:04.000    NaN
    2000-01-01 00:00:04.500    5.0
    2000-01-01 00:00:05.000    6.0
    2000-01-01 00:00:05.500    NaN
    2000-01-01 00:00:06.000    7.0
    2000-01-01 00:00:06.500    NaN
    2000-01-01 00:00:07.000    8.0
    Freq: 500L, dtype: float64"><pre class="notranslate">    <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">series</span>.<span class="pl-en">resample</span>(<span class="pl-s1">rule</span><span class="pl-c1">=</span><span class="pl-s">'0.5S'</span>).<span class="pl-en">head</span>(<span class="pl-c1">100</span>)
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.000</span>    <span class="pl-c1">0.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.500</span>    <span class="pl-c1">1.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">01.000</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">01.500</span>    <span class="pl-c1">2.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">02.000</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">02.500</span>    <span class="pl-c1">3.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">03.000</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">03.500</span>    <span class="pl-c1">4.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">04.000</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">04.500</span>    <span class="pl-c1">5.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">05.000</span>    <span class="pl-c1">6.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">05.500</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">06.000</span>    <span class="pl-c1">7.0</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">06.500</span>    <span class="pl-v">NaN</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">07.000</span>    <span class="pl-c1">8.0</span>
    <span class="pl-v">Freq</span>: <span class="pl-c1">500L</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div>
<p dir="auto">However I do not expect to get</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    &gt;&gt;&gt; series.resample(rule='0.5S').interpolate(method='linear')
    2000-01-01 00:00:00.000    0.000000
    2000-01-01 00:00:00.500    0.555556
    2000-01-01 00:00:01.000    1.111111
    2000-01-01 00:00:01.500    1.666667
    2000-01-01 00:00:02.000    2.222222
    2000-01-01 00:00:02.500    2.777778
    2000-01-01 00:00:03.000    3.333333
    2000-01-01 00:00:03.500    3.888889
    2000-01-01 00:00:04.000    4.444444
    2000-01-01 00:00:04.500    5.000000
    2000-01-01 00:00:05.000    5.000000
    2000-01-01 00:00:05.500    5.000000
    2000-01-01 00:00:06.000    5.000000
    2000-01-01 00:00:06.500    5.000000
    2000-01-01 00:00:07.000    5.000000
    Freq: 500L, dtype: float64"><pre class="notranslate">    <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">series</span>.<span class="pl-en">resample</span>(<span class="pl-s1">rule</span><span class="pl-c1">=</span><span class="pl-s">'0.5S'</span>).<span class="pl-en">interpolate</span>(<span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">'linear'</span>)
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.000</span>    <span class="pl-c1">0.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00.500</span>    <span class="pl-c1">0.555556</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">01.000</span>    <span class="pl-c1">1.111111</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">01.500</span>    <span class="pl-c1">1.666667</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">02.000</span>    <span class="pl-c1">2.222222</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">02.500</span>    <span class="pl-c1">2.777778</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">03.000</span>    <span class="pl-c1">3.333333</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">03.500</span>    <span class="pl-c1">3.888889</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">04.000</span>    <span class="pl-c1">4.444444</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">04.500</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">05.000</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">05.500</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">06.000</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">06.500</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">07.000</span>    <span class="pl-c1">5.000000</span>
    <span class="pl-v">Freq</span>: <span class="pl-c1">500L</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div>
<p dir="auto">instead I expect the last value to be still 8.0 and still 7.0 for the timestamp with 6.5 seconds.</p>
<p dir="auto">I posted this on <a href="https://stackoverflow.com/q/46728152/4533188" rel="nofollow">https://stackoverflow.com/q/46728152/4533188</a> and I was told this might be a bug - I got the same impression.</p>
<details>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-129-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: de_DE.UTF-8
pandas: 0.20.3
pytest: 3.2.1
pip: 9.0.1
setuptools: 36.2.2.post20170724
Cython: 0.26
numpy: 1.13.3
scipy: 0.19.1
xarray: None
IPython: None
sphinx: 1.6.3
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.9.8
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-en">show_versions</span>()
<span class="pl-v">INSTALLED</span> <span class="pl-v">VERSIONS</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-s1">commit</span>: <span class="pl-c1">None</span>
<span class="pl-s1">python</span>: <span class="pl-c1">3.6</span>.<span class="pl-c1">2.</span><span class="pl-s1">final</span>.<span class="pl-c1">0</span>
<span class="pl-s1">python</span><span class="pl-c1">-</span><span class="pl-s1">bits</span>: <span class="pl-c1">64</span>
<span class="pl-v">OS</span>: <span class="pl-v">Linux</span>
<span class="pl-v">OS</span><span class="pl-c1">-</span><span class="pl-s1">release</span>: <span class="pl-c1">3.13</span><span class="pl-c1">.0</span><span class="pl-c1">-</span><span class="pl-c1">129</span><span class="pl-c1">-</span><span class="pl-s1">generic</span>
<span class="pl-s1">machine</span>: <span class="pl-s1">x86_64</span>
<span class="pl-s1">processor</span>: <span class="pl-s1">x86_64</span>
<span class="pl-s1">byteorder</span>: <span class="pl-s1">little</span>
<span class="pl-v">LC_ALL</span>: <span class="pl-c1">None</span>
<span class="pl-v">LANG</span>: <span class="pl-s1">de_DE</span>.<span class="pl-v">UTF</span><span class="pl-c1">-</span><span class="pl-c1">8</span>
<span class="pl-v">LOCALE</span>: <span class="pl-s1">de_DE</span>.<span class="pl-v">UTF</span><span class="pl-c1">-</span><span class="pl-c1">8</span>
<span class="pl-s1">pandas</span>: <span class="pl-c1">0.20</span>.<span class="pl-c1">3</span>
<span class="pl-s1">pytest</span>: <span class="pl-c1">3.2</span>.<span class="pl-c1">1</span>
<span class="pl-s1">pip</span>: <span class="pl-c1">9.0</span>.<span class="pl-c1">1</span>
<span class="pl-s1">setuptools</span>: <span class="pl-c1">36.2</span>.<span class="pl-c1">2.</span><span class="pl-s1">post20170724</span>
<span class="pl-v">Cython</span>: <span class="pl-c1">0.26</span>
<span class="pl-s1">numpy</span>: <span class="pl-c1">1.13</span>.<span class="pl-c1">3</span>
<span class="pl-s1">scipy</span>: <span class="pl-c1">0.19</span>.<span class="pl-c1">1</span>
<span class="pl-s1">xarray</span>: <span class="pl-c1">None</span>
<span class="pl-v">IPython</span>: <span class="pl-c1">None</span>
<span class="pl-s1">sphinx</span>: <span class="pl-c1">1.6</span>.<span class="pl-c1">3</span>
<span class="pl-s1">patsy</span>: <span class="pl-c1">0.4</span>.<span class="pl-c1">1</span>
<span class="pl-s1">dateutil</span>: <span class="pl-c1">2.6</span>.<span class="pl-c1">1</span>
<span class="pl-s1">pytz</span>: <span class="pl-c1">2017.2</span>
<span class="pl-s1">blosc</span>: <span class="pl-c1">None</span>
<span class="pl-s1">bottleneck</span>: <span class="pl-c1">None</span>
<span class="pl-s1">tables</span>: <span class="pl-c1">None</span>
<span class="pl-s1">numexpr</span>: <span class="pl-c1">None</span>
<span class="pl-s1">feather</span>: <span class="pl-c1">None</span>
<span class="pl-s1">matplotlib</span>: <span class="pl-c1">2.0</span>.<span class="pl-c1">2</span>
<span class="pl-s1">openpyxl</span>: <span class="pl-c1">None</span>
<span class="pl-s1">xlrd</span>: <span class="pl-c1">None</span>
<span class="pl-s1">xlwt</span>: <span class="pl-c1">None</span>
<span class="pl-s1">xlsxwriter</span>: <span class="pl-c1">0.9</span>.<span class="pl-c1">8</span>
<span class="pl-s1">lxml</span>: <span class="pl-c1">None</span>
<span class="pl-s1">bs4</span>: <span class="pl-c1">None</span>
<span class="pl-s1">html5lib</span>: <span class="pl-c1">None</span>
<span class="pl-s1">sqlalchemy</span>: <span class="pl-c1">None</span>
<span class="pl-s1">pymysql</span>: <span class="pl-c1">None</span>
<span class="pl-s1">psycopg2</span>: <span class="pl-c1">None</span>
<span class="pl-s1">jinja2</span>: <span class="pl-c1">2.9</span>.<span class="pl-c1">6</span>
<span class="pl-s1">s3fs</span>: <span class="pl-c1">None</span>
<span class="pl-s1">pandas_gbq</span>: <span class="pl-c1">None</span>
<span class="pl-s1">pandas_datareader</span>: <span class="pl-c1">None</span></pre></div>
</details>
<p dir="auto">from SO: <a href="http://stackoverflow.com/questions/22178642/assignment-modification-of-values-in-an-indexed-subframe-in-pandas" rel="nofollow">http://stackoverflow.com/questions/22178642/assignment-modification-of-values-in-an-indexed-subframe-in-pandas</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="data = {'me':list('rttti'),'foo': list('aaade'), 'bar': arange(5)*1.34+2, 'bar2': arange(5)*-.34+2}
df = pd.DataFrame(data).set_index('me')

df.loc['r',['bar','bar2']]*=2.0
df.loc['t','bar']*=2.5
df.loc['t',['bar','bar2']]*=2.0"><pre class="notranslate"><code class="notranslate">data = {'me':list('rttti'),'foo': list('aaade'), 'bar': arange(5)*1.34+2, 'bar2': arange(5)*-.34+2}
df = pd.DataFrame(data).set_index('me')

df.loc['r',['bar','bar2']]*=2.0
df.loc['t','bar']*=2.5
df.loc['t',['bar','bar2']]*=2.0
</code></pre></div>