Replace usage of total_seconds compat func with timedelta method
State: closed

`total_seconds` and `tot_seconds` functions were apparently made for python 2.6 compat.  This removes them and replaces their usage with `timedelta.total_seconds` method.

There is one remaining use of this function in a C file.  I expect it will be easy to remove for someone who knows what they're doing.

See discussion https://github.com/pandas-dev/pandas/pull/17274#issuecomment-323363823

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Internals
description: Related to non-user accessible pandas implementation
name: Clean

Comments:
So the remaining one is here:

https://github.com/pandas-dev/pandas/blob/34c4ffd7c454848311f71e6869b5cad4bc132449/pandas/_libs/src/ujson/python/objToJSON.c#L1832-L1840

I am also not that familiar with python's c api, but can be get here the total_seonds attribute here from `obj` (obj is a timedelta, note sure what the 'value' attribute is) (@jreback ?)
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=h1) Report
> Merging [#17289](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/34c4ffd7c454848311f71e6869b5cad4bc132449?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `75%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17289/graphs/tree.svg?token=eZ4WkYLtcO&width=650&src=pr&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17289      +/-   ##
==========================================
- Coverage      91%   90.99%   -0.02%     
==========================================
  Files         162      162              
  Lines       49547    49547              
==========================================
- Hits        45092    45083       -9     
- Misses       4455     4464       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <75%> (ø)` | :arrow_up: |
| #single | `40.25% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.87% <0%> (ø)` | :arrow_up: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.13% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=footer). Last update [34c4ffd...32c8153](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=h1) Report
> Merging [#17289](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/34c4ffd7c454848311f71e6869b5cad4bc132449?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `75%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17289/graphs/tree.svg?token=eZ4WkYLtcO&height=150&src=pr&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17289      +/-   ##
==========================================
+ Coverage      91%   91.01%   +<.01%     
==========================================
  Files         162      162              
  Lines       49547    49567      +20     
==========================================
+ Hits        45092    45114      +22     
+ Misses       4455     4453       -2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.79% <75%> (+0.02%)` | :arrow_up: |
| #single | `40.24% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.87% <0%> (ø)` | :arrow_up: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.14% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/tseries/frequencies.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvZnJlcXVlbmNpZXMucHk=) | `96.51% <0%> (-0.16%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `95% <0%> (ø)` | :arrow_up: |
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `95.5% <0%> (+0.01%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.05% <0%> (+1.81%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=footer). Last update [34c4ffd...2d2c549](https://codecov.io/gh/pandas-dev/pandas/pull/17289?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @jbrockmendel if you have not made an issue for removing the ref in the json file pls do so.