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

hgrecco / pint / 939
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 01 Oct 2018 12:38PM UTC
Jobs 13
Files 16
Run time 10min
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

pending completion
939

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)

2872 of 3247 relevant lines covered (88.45%)

11.08 hits per line

Jobs
ID Job ID Ran Files Coverage
1 939.1 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=1) 01 Oct 2018 12:49PM UTC 0
87.32
Travis Job 939.1
2 939.2 (UNCERTAINTIES="N" PYTHON="3.3" NUMPY_VERSION=1.9.2 PANDAS=0) 01 Oct 2018 12:38PM UTC 0
86.14
Travis Job 939.2
3 939.3 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Oct 2018 12:39PM UTC 0
86.2
Travis Job 939.3
4 939.4 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Oct 2018 12:40PM UTC 0
86.11
Travis Job 939.4
5 939.5 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Oct 2018 12:41PM UTC 0
88.11
Travis Job 939.5
6 939.6 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 PANDAS=0) 01 Oct 2018 12:41PM UTC 0
86.11
Travis Job 939.6
7 939.7 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 PANDAS=0) 01 Oct 2018 12:42PM UTC 0
77.83
Travis Job 939.7
8 939.8 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=0 PANDAS=0) 01 Oct 2018 12:43PM UTC 0
77.79
Travis Job 939.8
9 939.9 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=1.14 PANDAS=0) 01 Oct 2018 12:45PM UTC 0
86.26
Travis Job 939.9
10 939.10 (UNCERTAINTIES="N" PYTHON="3.4" NUMPY_VERSION=1.14 PANDAS=0) 01 Oct 2018 12:45PM UTC 0
86.14
Travis Job 939.10
11 939.11 (UNCERTAINTIES="N" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Oct 2018 12:45PM UTC 0
86.14
Travis Job 939.11
12 939.12 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 PANDAS=0) 01 Oct 2018 12:46PM UTC 0
88.05
Travis Job 939.12
13 939.13 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.14 PANDAS=0) 01 Oct 2018 12:47PM UTC 0
86.14
Travis Job 939.13
Source Files on build 939
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #939
  • 34fc8d64 on github
  • Prev Build on staging (#937)
  • Next Build on staging (#943)
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