• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 940 / 7
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 01 Oct 2018 12:54PM UTC
Files 16
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Oct 2018 12:34PM UTC coverage: 77.826%. Remained the same
UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0

push

travis-ci

bors[bot]
Merge #703

703: Fix dequantify bug r=hgrecco a=znicholls

At the moment, if you take a pint dataframe and dequantify it, you lose all the index information e.g. 

```python
df
```

```python
    speed mech power torque  rail pressure fuel flow rate fluid power
      rpm         kW    N m            bar          l/min          kW
a c  1000        NaN     10           1000             10         NaN
b c  1100        NaN     10  1000000000000             10         NaN
a d  1200        NaN     10           1000             10         NaN
b d  1200        NaN     10           1000             10         NaN
```

`quantify` works fine

```python
df.pint.quantify(ureg)
```


```python
      speed mech power torque    rail pressure fuel flow rate fluid power
a c  1000.0        nan   10.0           1000.0           10.0         nan
b c  1100.0        nan   10.0  1000000000000.0           10.0         nan
a d  1200.0        nan   10.0           1000.0           10.0         nan
b d  1200.0        nan   10.0           1000.0           10.0         nan
```

`dequantify` after quantification doesn't (and also changes the type of nan oddly enough...)

```python
df.pint.quantify(ureg).pint.dequantify()
```

```python
                   speed mech power         torque rail pressure fuel flow rate fluid power
  revolutions_per_minute   kilowatt meter * newton           bar liter / minute    kilowatt
0                 1000.0        NaN           10.0  1.000000e+03           10.0         NaN
1                 1100.0        NaN           10.0  1.000000e+12           10.0         NaN
2                 1200.0        NaN           10.0  1.000000e+03           10.0         NaN
3                 1200.0        NaN           10.0  1.000000e+03           10.0         NaN
```

This is my attempt to fix that. @andrewgsavage might have a better solution/suggestions of other tests we should write.

Annoyingly I had to make our test cs... (continued)

2527 of 3247 relevant lines covered (77.83%)

0.78 hits per line

Source Files on job 940.7 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 907
  • Travis Job 940.7
  • 34fc8d64 on github
  • Prev Job for UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0 on master (#938.7)
  • Next Job for UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0 on master (#944.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc