Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: replace %s formatting syntax with .format #16130

Closed
jreback opened this issue Apr 25, 2017 · 15 comments
Closed

CLN: replace %s formatting syntax with .format #16130

jreback opened this issue Apr 25, 2017 · 15 comments
Labels
Clean Code Style Code style, linting, code_checks good first issue

Comments

@jreback
Copy link
Contributor

jreback commented Apr 25, 2017

only showing a small snippet. There are about 1000 separate incidents of this (including .py and .pyx) files.

This is pretty easy to change of course (though its somewhat manual).
It provides a cleaner syntax (include kwargs optionally, which makes it more readable). and guards
against accidently trying to format a list/tuple.

(pandas) bash-3.2$ grep -R '%s' pandas --include '*.pyx'
pandas/_libs/interval.pyx:            raise ValueError("invalid option for 'closed': %s" % closed)
pandas/_libs/interval.pyx:                'unorderable types: %s() %s %s()' %
pandas/_libs/interval.pyx:        return ('%s(%r, %r, closed=%r)' %
pandas/_libs/interval.pyx:        return '%s%s, %s%s' % (start_symbol, left, right, end_symbol)
pandas/_libs/lib.pyx:        return '%s(%r)' % (self.__class__.__name__, v)
pandas/_libs/period.pyx:            return '%s/%s' % (period_format(left, 6000),
pandas/_libs/period.pyx:        return "Period('%s', '%s')" % (formatted, self.freqstr)
pandas/_libs/period.pyx:        value = ("%s" % formatted)
pandas/_libs/period.pyx:                        "Invalid frequency or could not infer: %s" % reso)
pandas/_libs/src/properties.pyx:            raise Exception("cannot set values for [%s]" % self.name)

So replacing [5] with [6] or [7]

In [4]: cool = 'cool'

In [5]: "foo is %s" % cool
Out[5]: 'foo is cool'

In [6]: "foo is {}".format(cool)
Out[6]: 'foo is cool'

In [7]: "foo is {cool}".format(cool=cool)
Out[7]: 'foo is cool'

Ideally we would even use f-strings, but only >= 3.6 :<

@jreback jreback added this to the Next Major Release milestone Apr 25, 2017
@gfyoung
Copy link
Member

gfyoung commented Apr 25, 2017

Indeed, the f-string syntax would be nice...however, between [6] and [7], I would prefer that we use [7]. True, it is slightly more verbose, but it is also a little clearer.

@cbertinato
Copy link
Contributor

I'd like to contribute on this one. One question: what about other specifiers, like %d? For some strings, using something like [7] can make some strings that were readable a little less so.

For example:
fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month, dts.day, dts.hour, dts.min, dts.sec)
would become:

fmt = '{arg1:d}-{arg2:.2d}-{arg3:.2d} {arg4:.2d}:{arg5:.2d}:{arg6:.2d}'.format(
        arg1=dts.year, arg2= dts.month, arg3=dts.day, arg4=dts.hour, arg5=dts.min, arg6=dts.sec)

@jreback
Copy link
Contributor Author

jreback commented Apr 27, 2017

in that case i would use [6]
generally we do like to use [7] but readability is key here

@TomAugspurger
Copy link
Contributor

Keep in mind that some classes define their own formatting rules, e.g.

In [45]: dts = pd.Timestamp('2017-01-01T12:03:04')

In [46]: '{:%Y-%m-%d %T}'.format(dts)
Out[46]: '2017-01-01 12:03:04'

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Aug 23, 2017

If we really wanted to, we can add this flake8 plugin when we're done: https://github.com/gforcada/flake8-pep3101

output:

pandas/core/algorithms.py:677:14: S001 found module formatter
pandas/core/algorithms.py:882:12: S001 found module formatter
pandas/core/algorithms.py:887:38: S001 found module formatter
pandas/core/base.py:345:29: S001 found module formatter
pandas/core/base.py:351:32: S001 found module formatter
pandas/core/base.py:357:32: S001 found module formatter
pandas/core/base.py:362:32: S001 found module formatter
pandas/core/categorical.py:897:20: S001 found module formatter
pandas/core/categorical.py:952:30: S001 found module formatter
pandas/core/categorical.py:1607:18: S001 found module formatter
pandas/core/categorical.py:1609:22: S001 found module formatter
pandas/core/categorical.py:1637:21: S001 found module formatter
pandas/core/categorical.py:1679:23: S001 found module formatter
pandas/core/common.py:99:17: S001 found module formatter
pandas/core/common.py:153:25: S001 found module formatter
pandas/core/common.py:217:25: S001 found module formatter
pandas/core/config.py:83:27: S001 found module formatter
pandas/core/config.py:107:21: S001 found module formatter
pandas/core/config.py:439:27: S001 found module formatter
pandas/core/config.py:441:27: S001 found module formatter
pandas/core/config.py:452:30: S001 found module formatter
pandas/core/config.py:454:30: S001 found module formatter
pandas/core/config.py:459:31: S001 found module formatter
pandas/core/config.py:466:27: S001 found module formatter
pandas/core/config.py:519:27: S001 found module formatter
pandas/core/config.py:617:19: S001 found module formatter
pandas/core/config.py:619:24: S001 found module formatter
pandas/core/config.py:621:24: S001 found module formatter
pandas/core/config.py:721:20: S001 found module formatter
pandas/core/config.py:757:30: S001 found module formatter
pandas/core/config.py:780:21: S001 found module formatter
pandas/core/config.py:784:30: S001 found module formatter
pandas/core/config_init.py:458:60: S001 found module formatter
pandas/core/frame.py:384:33: S001 found module formatter
pandas/core/frame.py:510:36: S001 found module formatter
pandas/core/frame.py:838:34: S001 found module formatter
pandas/core/frame.py:853:29: S001 found module formatter
pandas/core/frame.py:995:30: S001 found module formatter
pandas/core/frame.py:1212:42: S001 found module formatter
pandas/core/frame.py:1749:26: S001 found module formatter
pandas/core/frame.py:1770:26: S001 found module formatter
pandas/core/frame.py:1779:42: S001 found module formatter
pandas/core/frame.py:1792:53: S001 found module formatter
pandas/core/frame.py:1801:28: S001 found module formatter
pandas/core/frame.py:1803:20: S001 found module formatter
pandas/core/frame.py:1816:19: S001 found module formatter
pandas/core/frame.py:1817:22: S001 found module formatter
pandas/core/frame.py:1835:26: S001 found module formatter
pandas/core/frame.py:2112:34: S001 found module formatter
pandas/core/frame.py:2406:30: S001 found module formatter
pandas/core/frame.py:2472:34: S001 found module formatter
pandas/core/frame.py:3007:30: S001 found module formatter
pandas/core/frame.py:3199:51: S001 found module formatter
pandas/core/frame.py:3353:38: S001 found module formatter
pandas/core/frame.py:3450:30: S001 found module formatter
pandas/core/frame.py:3464:38: S001 found module formatter
pandas/core/frame.py:3479:38: S001 found module formatter
pandas/core/frame.py:3483:34: S001 found module formatter
pandas/core/frame.py:3820:39: S001 found module formatter
pandas/core/frame.py:3831:39: S001 found module formatter
pandas/core/frame.py:4725:34: S001 found module formatter
pandas/core/frame.py:4752:44: S001 found module formatter
pandas/core/frame.py:4782:34: S001 found module formatter
pandas/core/frame.py:5434:29: S001 found module formatter
pandas/core/frame.py:5509:45: S001 found module formatter
pandas/core/frame.py:5523:28: S001 found module formatter
pandas/core/frame.py:5646:30: S001 found module formatter
pandas/core/frame.py:5789:34: S001 found module formatter
pandas/core/frame.py:5820:34: S001 found module formatter
pandas/core/frame.py:5980:28: S001 found module formatter
pandas/core/frame.py:6180:34: S001 found module formatter
pandas/core/frame.py:6207:24: S001 found module formatter
pandas/core/frame.py:6256:13: S001 found module formatter
pandas/core/generic.py:190:17: S001 found module formatter
pandas/core/generic.py:191:16: S001 found module formatter
pandas/core/generic.py:312:41: S001 found module formatter
pandas/core/generic.py:592:30: S001 found module formatter
pandas/core/generic.py:1755:21: S001 found module formatter
pandas/core/generic.py:3218:49: S001 found module formatter
pandas/core/generic.py:3290:34: S001 found module formatter
pandas/core/generic.py:4119:38: S001 found module formatter
pandas/core/generic.py:4146:34: S001 found module formatter
pandas/core/generic.py:4367:42: S001 found module formatter
pandas/core/generic.py:5518:29: S001 found module formatter
pandas/core/generic.py:6011:24: S001 found module formatter
pandas/core/generic.py:6054:34: S001 found module formatter
pandas/core/generic.py:6099:37: S001 found module formatter
pandas/core/generic.py:6167:37: S001 found module formatter
pandas/core/generic.py:6770:18: S001 found module formatter
pandas/core/groupby.py:551:30: S001 found module formatter
pandas/core/groupby.py:1396:30: S001 found module formatter
pandas/core/groupby.py:1697:25: S001 found module formatter
pandas/core/groupby.py:1981:41: S001 found module formatter
pandas/core/groupby.py:2004:39: S001 found module formatter
pandas/core/groupby.py:2082:25: S001 found module formatter
pandas/core/groupby.py:2442:42: S001 found module formatter
pandas/core/groupby.py:2492:38: S001 found module formatter
pandas/core/groupby.py:2496:31: S001 found module formatter
pandas/core/groupby.py:2596:38: S001 found module formatter
pandas/core/groupby.py:2680:25: S001 found module formatter
pandas/core/groupby.py:2803:15: S001 found module formatter
pandas/core/groupby.py:2937:42: S001 found module formatter
pandas/core/groupby.py:3142:17: S001 found module formatter
pandas/core/groupby.py:3958:33: S001 found module formatter
pandas/core/indexing.py:190:34: S001 found module formatter
pandas/core/indexing.py:1237:36: S001 found module formatter
pandas/core/indexing.py:1423:32: S001 found module formatter
pandas/core/indexing.py:1434:32: S001 found module formatter
pandas/core/indexing.py:1772:26: S001 found module formatter
pandas/core/internals.py:116:30: S001 found module formatter
pandas/core/internals.py:237:22: S001 found module formatter
pandas/core/internals.py:242:22: S001 found module formatter
pandas/core/internals.py:311:16: S001 found module formatter
pandas/core/internals.py:322:34: S001 found module formatter
pandas/core/internals.py:595:33: S001 found module formatter
pandas/core/internals.py:961:44: S001 found module formatter
pandas/core/internals.py:1269:38: S001 found module formatter
pandas/core/internals.py:1317:33: S001 found module formatter
pandas/core/internals.py:1345:38: S001 found module formatter
pandas/core/internals.py:1348:33: S001 found module formatter
pandas/core/internals.py:1415:37: S001 found module formatter
pandas/core/internals.py:2766:34: S001 found module formatter
pandas/core/internals.py:2892:42: S001 found module formatter
pandas/core/internals.py:2936:30: S001 found module formatter
pandas/core/internals.py:3579:34: S001 found module formatter
pandas/core/internals.py:4131:34: S001 found module formatter
pandas/core/internals.py:4710:29: S001 found module formatter
pandas/core/internals.py:4713:29: S001 found module formatter
pandas/core/internals.py:4715:25: S001 found module formatter
pandas/core/internals.py:4793:30: S001 found module formatter
pandas/core/internals.py:4798:24: S001 found module formatter
pandas/core/internals.py:4803:24: S001 found module formatter
pandas/core/internals.py:5258:16: S001 found module formatter
pandas/core/missing.py:91:16: S001 found module formatter
pandas/core/missing.py:149:26: S001 found module formatter
pandas/core/missing.py:469:34: S001 found module formatter
pandas/core/missing.py:479:26: S001 found module formatter
pandas/core/missing.py:493:34: S001 found module formatter
pandas/core/missing.py:503:26: S001 found module formatter
pandas/core/missing.py:518:34: S001 found module formatter
pandas/core/missing.py:528:26: S001 found module formatter
pandas/core/missing.py:547:34: S001 found module formatter
pandas/core/missing.py:557:26: S001 found module formatter
pandas/core/nanops.py:789:33: S001 found module formatter
pandas/core/ops.py:66:24: S001 found module formatter
pandas/core/ops.py:68:24: S001 found module formatter
pandas/core/ops.py:111:40: S001 found module formatter
pandas/core/ops.py:389:33: S001 found module formatter
pandas/core/ops.py:403:33: S001 found module formatter
pandas/core/ops.py:412:33: S001 found module formatter
pandas/core/ops.py:420:33: S001 found module formatter
pandas/core/ops.py:428:33: S001 found module formatter
pandas/core/ops.py:441:33: S001 found module formatter
pandas/core/ops.py:869:33: S001 found module formatter
pandas/core/ops.py:1048:11: S001 found module formatter
pandas/core/ops.py:1229:15: S001 found module formatter
pandas/core/ops.py:1232:15: S001 found module formatter
pandas/core/ops.py:1281:15: S001 found module formatter
pandas/core/ops.py:1302:15: S001 found module formatter
pandas/core/ops.py:1352:30: S001 found module formatter
pandas/core/ops.py:1387:15: S001 found module formatter
pandas/core/ops.py:1397:29: S001 found module formatter
pandas/core/panel.py:44:41: S001 found module formatter
pandas/core/panel.py:313:34: S001 found module formatter
pandas/core/panel.py:356:14: S001 found module formatter
pandas/core/panel.py:588:29: S001 found module formatter
pandas/core/panel.py:715:39: S001 found module formatter
pandas/core/panel.py:1164:26: S001 found module formatter
pandas/core/panel.py:1469:34: S001 found module formatter
pandas/core/panel.py:1492:0: S001 found module formatter
pandas/core/panel.py:1530:0: S001 found module formatter
pandas/core/panel.py:1542:23: S001 found module formatter
pandas/core/panel.py:1545:23: S001 found module formatter
pandas/core/panelnd.py:39:29: S001 found module formatter
pandas/core/panelnd.py:66:29: S001 found module formatter
pandas/core/resample.py:1103:25: S001 found module formatter
pandas/core/resample.py:1138:29: S001 found module formatter
pandas/core/resample.py:1220:29: S001 found module formatter
pandas/core/resample.py:1246:29: S001 found module formatter
pandas/core/resample.py:1291:24: S001 found module formatter
pandas/core/resample.py:1331:19: S001 found module formatter
pandas/core/series.py:566:29: S001 found module formatter
pandas/core/series.py:843:30: S001 found module formatter
pandas/core/series.py:1532:33: S001 found module formatter
pandas/core/series.py:1543:29: S001 found module formatter
pandas/core/series.py:1799:34: S001 found module formatter
pandas/core/window.py:178:30: S001 found module formatter
pandas/core/window.py:555:23: S001 found module formatter
pandas/core/window.py:559:42: S001 found module formatter
pandas/core/window.py:2062:25: S001 found module formatter
pandas/core/window.py:2075:25: S001 found module formatter
pandas/core/window.py:2085:25: S001 found module formatter
pandas/core/indexes/base.py:861:18: S001 found module formatter
pandas/core/indexes/base.py:862:18: S001 found module formatter
pandas/core/indexes/base.py:899:23: S001 found module formatter
pandas/core/indexes/base.py:903:23: S001 found module formatter
pandas/core/indexes/base.py:965:32: S001 found module formatter
pandas/core/indexes/base.py:1075:30: S001 found module formatter
pandas/core/indexes/base.py:1182:29: S001 found module formatter
pandas/core/indexes/base.py:1189:16: S001 found module formatter
pandas/core/indexes/base.py:1567:34: S001 found module formatter
pandas/core/indexes/base.py:1570:34: S001 found module formatter
pandas/core/indexes/base.py:1574:28: S001 found module formatter
pandas/core/indexes/base.py:1682:25: S001 found module formatter
pandas/core/indexes/base.py:2091:35: S001 found module formatter
pandas/core/indexes/base.py:2205:35: S001 found module formatter
pandas/core/indexes/base.py:2220:35: S001 found module formatter
pandas/core/indexes/base.py:2642:30: S001 found module formatter
pandas/core/indexes/base.py:3485:30: S001 found module formatter
pandas/core/indexes/base.py:3513:32: S001 found module formatter
pandas/core/indexes/base.py:3639:34: S001 found module formatter
pandas/core/indexes/base.py:4071:26: S001 found module formatter
pandas/core/indexes/category.py:237:32: S001 found module formatter
pandas/core/indexes/datetimelike.py:90:28: S001 found module formatter
pandas/core/indexes/datetimelike.py:95:33: S001 found module formatter
pandas/core/indexes/datetimelike.py:96:31: S001 found module formatter
pandas/core/indexes/datetimelike.py:112:15: S001 found module formatter
pandas/core/indexes/datetimelike.py:116:15: S001 found module formatter
pandas/core/indexes/datetimelike.py:120:15: S001 found module formatter
pandas/core/indexes/datetimelike.py:438:30: S001 found module formatter
pandas/core/indexes/datetimelike.py:582:28: S001 found module formatter
pandas/core/indexes/datetimelike.py:824:29: S001 found module formatter
pandas/core/indexes/datetimelike.py:831:18: S001 found module formatter
pandas/core/indexes/datetimelike.py:834:23: S001 found module formatter
pandas/core/indexes/datetimes.py:144:21: S001 found module formatter
pandas/core/indexes/datetimes.py:295:34: S001 found module formatter
pandas/core/indexes/datetimes.py:322:34: S001 found module formatter
pandas/core/indexes/datetimes.py:699:26: S001 found module formatter
pandas/core/indexes/datetimes.py:865:26: S001 found module formatter
pandas/core/indexes/frozen.py:69:25: S001 found module formatter
pandas/core/indexes/frozen.py:77:16: S001 found module formatter
pandas/core/indexes/frozen.py:95:25: S001 found module formatter
pandas/core/indexes/frozen.py:118:16: S001 found module formatter
pandas/core/indexes/interval.py:55:25: S001 found module formatter
pandas/core/indexes/interval.py:70:25: S001 found module formatter
pandas/core/indexes/interval.py:222:30: S001 found module formatter
pandas/core/indexes/interval.py:510:26: S001 found module formatter
pandas/core/indexes/interval.py:984:32: S001 found module formatter
pandas/core/indexes/interval.py:988:16: S001 found module formatter
pandas/core/indexes/multi.py:149:34: S001 found module formatter
pandas/core/indexes/multi.py:152:34: S001 found module formatter
pandas/core/indexes/multi.py:497:16: S001 found module formatter
pandas/core/indexes/multi.py:619:34: S001 found module formatter
pandas/core/indexes/multi.py:624:32: S001 found module formatter
pandas/core/indexes/multi.py:629:38: S001 found module formatter
pandas/core/indexes/multi.py:634:34: S001 found module formatter
pandas/core/indexes/multi.py:1506:38: S001 found module formatter
pandas/core/indexes/multi.py:1638:34: S001 found module formatter
pandas/core/indexes/multi.py:1767:32: S001 found module formatter
pandas/core/indexes/multi.py:1919:17: S001 found module formatter
pandas/core/indexes/multi.py:1931:37: S001 found module formatter
pandas/core/indexes/multi.py:2531:29: S001 found module formatter
pandas/core/indexes/numeric.py:78:30: S001 found module formatter
pandas/core/indexes/numeric.py:292:29: S001 found module formatter
pandas/core/indexes/period.py:65:26: S001 found module formatter
pandas/core/indexes/period.py:202:34: S001 found module formatter
pandas/core/indexes/period.py:428:26: S001 found module formatter
pandas/core/indexes/period.py:466:26: S001 found module formatter
pandas/core/indexes/period.py:641:20: S001 found module formatter
pandas/core/indexes/period.py:658:25: S001 found module formatter
pandas/core/indexes/range.py:422:22: S001 found module formatter
pandas/core/indexes/range.py:426:18: S001 found module formatter
pandas/core/indexes/range.py:431:18: S001 found module formatter
pandas/core/indexes/timedeltas.py:183:34: S001 found module formatter
pandas/core/indexes/timedeltas.py:199:34: S001 found module formatter
pandas/core/indexes/timedeltas.py:486:26: S001 found module formatter
pandas/core/indexes/timedeltas.py:943:23: S001 found module formatter
pandas/core/reshape/merge.py:62:21: S001 found module formatter
pandas/core/tools/datetimes.py:652:47: S001 found module formatter
pandas/core/tools/datetimes.py:813:42: S001 found module formatter
pandas/core/tools/datetimes.py:879:26: S001 found module formatter
pandas/core/util/hashing.py:119:25: S001 found module formatter
pandas/io/excel.py:168:36: S001 found module formatter
pandas/io/excel.py:193:26: S001 found module formatter
pandas/io/excel.py:257:30: S001 found module formatter
pandas/io/excel.py:443:23: S001 found module formatter
pandas/io/excel.py:632:15: S001 found module formatter
pandas/io/excel.py:695:48: S001 found module formatter
pandas/io/excel.py:697:40: S001 found module formatter
pandas/io/excel.py:852:30: S001 found module formatter
pandas/io/excel.py:874:33: S001 found module formatter
pandas/io/excel.py:893:46: S001 found module formatter
pandas/io/excel.py:953:25: S001 found module formatter
pandas/io/excel.py:975:33: S001 found module formatter
pandas/io/excel.py:994:41: S001 found module formatter
pandas/io/excel.py:1503:23: S001 found module formatter
pandas/io/excel.py:1505:23: S001 found module formatter
pandas/io/excel.py:1508:23: S001 found module formatter
pandas/io/excel.py:1510:23: S001 found module formatter
pandas/io/excel.py:1513:20: S001 found module formatter
pandas/io/html.py:115:21: S001 found module formatter
pandas/io/html.py:144:25: S001 found module formatter
pandas/io/html.py:442:30: S001 found module formatter
pandas/io/html.py:449:30: S001 found module formatter
pandas/io/html.py:531:30: S001 found module formatter
pandas/io/html.py:577:27: S001 found module formatter
pandas/io/html.py:673:26: S001 found module formatter
pandas/io/html.py:698:12: S001 found module formatter
pandas/io/html.py:708:29: S001 found module formatter
pandas/io/html.py:720:26: S001 found module formatter
pandas/io/packers.py:502:25: S001 found module formatter
pandas/io/parsers.py:325:0: S001 found module formatter
pandas/io/parsers.py:325:8: S001 found module formatter
pandas/io/parsers.py:331:0: S001 found module formatter
pandas/io/parsers.py:331:8: S001 found module formatter
pandas/io/parsers.py:354:0: S001 found module formatter
pandas/io/parsers.py:354:8: S001 found module formatter
pandas/io/parsers.py:799:29: S001 found module formatter
pandas/io/parsers.py:1297:21: S001 found module formatter
pandas/io/parsers.py:1329:27: S001 found module formatter
pandas/io/parsers.py:1378:30: S001 found module formatter
pandas/io/parsers.py:1403:34: S001 found module formatter
pandas/io/parsers.py:1506:23: S001 found module formatter
pandas/io/parsers.py:1584:34: S001 found module formatter
pandas/io/parsers.py:1644:31: S001 found module formatter
pandas/io/parsers.py:2050:38: S001 found module formatter
pandas/io/parsers.py:2052:38: S001 found module formatter
pandas/io/parsers.py:2306:29: S001 found module formatter
pandas/io/parsers.py:2329:49: S001 found module formatter
pandas/io/parsers.py:2332:49: S001 found module formatter
pandas/io/parsers.py:2345:35: S001 found module formatter
pandas/io/parsers.py:2408:33: S001 found module formatter
pandas/io/parsers.py:2834:24: S001 found module formatter
pandas/io/parsers.py:3004:38: S001 found module formatter
pandas/io/parsers.py:3014:34: S001 found module formatter
pandas/io/parsers.py:3180:31: S001 found module formatter
pandas/io/parsers.py:3246:29: S001 found module formatter
pandas/io/parsers.py:3296:31: S001 found module formatter
pandas/io/parsers.py:3297:30: S001 found module formatter
pandas/io/pytables.py:346:17: S001 found module formatter
pandas/io/pytables.py:496:30: S001 found module formatter
pandas/io/pytables.py:514:16: S001 found module formatter
pandas/io/pytables.py:582:23: S001 found module formatter
pandas/io/pytables.py:669:28: S001 found module formatter
pandas/io/pytables.py:698:28: S001 found module formatter
pandas/io/pytables.py:803:32: S001 found module formatter
pandas/io/pytables.py:806:21: S001 found module formatter
pandas/io/pytables.py:904:28: S001 found module formatter
pandas/io/pytables.py:1159:18: S001 found module formatter
pandas/io/pytables.py:1175:39: S001 found module formatter
pandas/io/pytables.py:1210:17: S001 found module formatter
pandas/io/pytables.py:1506:39: S001 found module formatter
pandas/io/pytables.py:1537:16: S001 found module formatter
pandas/io/pytables.py:1660:25: S001 found module formatter
pandas/io/pytables.py:1673:33: S001 found module formatter
pandas/io/pytables.py:1690:26: S001 found module formatter
pandas/io/pytables.py:1699:25: S001 found module formatter
pandas/io/pytables.py:1786:29: S001 found module formatter
pandas/io/pytables.py:1796:28: S001 found module formatter
pandas/io/pytables.py:1808:29: S001 found module formatter
pandas/io/pytables.py:1810:28: S001 found module formatter
pandas/io/pytables.py:1822:16: S001 found module formatter
pandas/io/pytables.py:1872:21: S001 found module formatter
pandas/io/pytables.py:1954:25: S001 found module formatter
pandas/io/pytables.py:1978:45: S001 found module formatter
pandas/io/pytables.py:1985:24: S001 found module formatter
pandas/io/pytables.py:1987:24: S001 found module formatter
pandas/io/pytables.py:2261:21: S001 found module formatter
pandas/io/pytables.py:2262:20: S001 found module formatter
pandas/io/pytables.py:2474:55: S001 found module formatter
pandas/io/pytables.py:2486:29: S001 found module formatter
pandas/io/pytables.py:2490:33: S001 found module formatter
pandas/io/pytables.py:2493:33: S001 found module formatter
pandas/io/pytables.py:2496:33: S001 found module formatter
pandas/io/pytables.py:2499:33: S001 found module formatter
pandas/io/pytables.py:2519:26: S001 found module formatter
pandas/io/pytables.py:2520:26: S001 found module formatter
pandas/io/pytables.py:2521:29: S001 found module formatter
pandas/io/pytables.py:2524:38: S001 found module formatter
pandas/io/pytables.py:2525:33: S001 found module formatter
pandas/io/pytables.py:2526:36: S001 found module formatter
pandas/io/pytables.py:2530:26: S001 found module formatter
pandas/io/pytables.py:2531:29: S001 found module formatter
pandas/io/pytables.py:2534:38: S001 found module formatter
pandas/io/pytables.py:2535:35: S001 found module formatter
pandas/io/pytables.py:2539:29: S001 found module formatter
pandas/io/pytables.py:2545:25: S001 found module formatter
pandas/io/pytables.py:2554:36: S001 found module formatter
pandas/io/pytables.py:2557:25: S001 found module formatter
pandas/io/pytables.py:2561:39: S001 found module formatter
pandas/io/pytables.py:2567:25: S001 found module formatter
pandas/io/pytables.py:2573:25: S001 found module formatter
pandas/io/pytables.py:2683:22: S001 found module formatter
pandas/io/pytables.py:2816:19: S001 found module formatter
pandas/io/pytables.py:2828:19: S001 found module formatter
pandas/io/pytables.py:2852:44: S001 found module formatter
pandas/io/pytables.py:2885:34: S001 found module formatter
pandas/io/pytables.py:2892:41: S001 found module formatter
pandas/io/pytables.py:2893:38: S001 found module formatter
pandas/io/pytables.py:2913:30: S001 found module formatter
pandas/io/pytables.py:2920:30: S001 found module formatter
pandas/io/pytables.py:2921:30: S001 found module formatter
pandas/io/pytables.py:2992:14: S001 found module formatter
pandas/io/pytables.py:2997:19: S001 found module formatter
pandas/io/pytables.py:2999:16: S001 found module formatter
pandas/io/pytables.py:3017:29: S001 found module formatter
pandas/io/pytables.py:3030:29: S001 found module formatter
pandas/io/pytables.py:3035:21: S001 found module formatter
pandas/io/pytables.py:3195:22: S001 found module formatter
pandas/io/pytables.py:3216:21: S001 found module formatter
pandas/io/pytables.py:3403:33: S001 found module formatter
pandas/io/pytables.py:3522:25: S001 found module formatter
pandas/io/pytables.py:3549:38: S001 found module formatter
pandas/io/pytables.py:3572:21: S001 found module formatter
pandas/io/pytables.py:3642:25: S001 found module formatter
pandas/io/pytables.py:3720:25: S001 found module formatter
pandas/io/pytables.py:3732:24: S001 found module formatter
pandas/io/pytables.py:4041:29: S001 found module formatter
pandas/io/pytables.py:4048:29: S001 found module formatter
pandas/io/pytables.py:4525:26: S001 found module formatter
pandas/io/pytables.py:4538:26: S001 found module formatter
pandas/io/pytables.py:4567:35: S001 found module formatter
pandas/io/pytables.py:4629:26: S001 found module formatter
pandas/io/sql.py:260:26: S001 found module formatter
pandas/io/sql.py:270:26: S001 found module formatter
pandas/io/sql.py:575:30: S001 found module formatter
pandas/io/sql.py:592:34: S001 found module formatter
pandas/io/sql.py:1148:38: S001 found module formatter
pandas/io/sql.py:1231:26: S001 found module formatter
pandas/io/sql.py:1292:28: S001 found module formatter
pandas/io/sql.py:1414:36: S001 found module formatter
pandas/io/sql.py:1419:17: S001 found module formatter
pandas/io/sql.py:1503:38: S001 found module formatter
pandas/io/sql.py:1518:17: S001 found module formatter
pandas/io/sql.py:1527:20: S001 found module formatter
pandas/io/stata.py:109:0: S001 found module formatter
pandas/io/stata.py:127:0: S001 found module formatter
pandas/io/stata.py:143:0: S001 found module formatter
pandas/io/stata.py:157:0: S001 found module formatter
pandas/io/stata.py:326:17: S001 found module formatter
pandas/io/stata.py:330:18: S001 found module formatter
pandas/io/stata.py:334:18: S001 found module formatter
pandas/io/stata.py:338:18: S001 found module formatter
pandas/io/stata.py:345:26: S001 found module formatter
pandas/io/stata.py:441:26: S001 found module formatter
pandas/io/stata.py:539:30: S001 found module formatter
pandas/io/stata.py:557:26: S001 found module formatter
pandas/io/stata.py:802:16: S001 found module formatter
pandas/io/stata.py:1753:26: S001 found module formatter
pandas/io/stata.py:1771:35: S001 found module formatter
pandas/io/stata.py:1824:35: S001 found module formatter
pandas/io/stata.py:1850:30: S001 found module formatter
pandas/io/stata.py:1861:35: S001 found module formatter
pandas/io/stata.py:2272:25: S001 found module formatter
pandas/io/clipboard/exceptions.py:11:20: S001 found module formatter
pandas/io/formats/css.py:97:20: S001 found module formatter
pandas/io/formats/css.py:102:26: S001 found module formatter
pandas/io/formats/css.py:102:46: S001 found module formatter
pandas/io/formats/css.py:155:27: S001 found module formatter
pandas/io/formats/css.py:218:31: S001 found module formatter
pandas/io/formats/css.py:222:23: S001 found module formatter
pandas/io/formats/css.py:247:31: S001 found module formatter
pandas/io/formats/excel.py:135:51: S001 found module formatter
pandas/io/formats/excel.py:136:51: S001 found module formatter
pandas/io/formats/excel.py:138:27: S001 found module formatter
pandas/io/formats/excel.py:305:27: S001 found module formatter
pandas/io/formats/excel.py:372:23: S001 found module formatter
pandas/io/formats/excel.py:437:38: S001 found module formatter
pandas/io/formats/format.py:112:23: S001 found module formatter
pandas/io/formats/format.py:138:19: S001 found module formatter
pandas/io/formats/format.py:194:23: S001 found module formatter
pandas/io/formats/format.py:202:24: S001 found module formatter
pandas/io/formats/format.py:208:23: S001 found module formatter
pandas/io/formats/format.py:215:27: S001 found module formatter
pandas/io/formats/format.py:512:39: S001 found module formatter
pandas/io/formats/format.py:633:28: S001 found module formatter
pandas/io/formats/format.py:808:27: S001 found module formatter
pandas/io/formats/format.py:909:34: S001 found module formatter
pandas/io/formats/format.py:913:23: S001 found module formatter
pandas/io/formats/format.py:916:23: S001 found module formatter
pandas/io/formats/format.py:951:25: S001 found module formatter
pandas/io/formats/format.py:1079:21: S001 found module formatter
pandas/io/formats/format.py:1088:25: S001 found module formatter
pandas/io/formats/format.py:1090:25: S001 found module formatter
pandas/io/formats/format.py:1099:20: S001 found module formatter
pandas/io/formats/format.py:1109:24: S001 found module formatter
pandas/io/formats/format.py:1149:38: S001 found module formatter
pandas/io/formats/format.py:1165:20: S001 found module formatter
pandas/io/formats/format.py:1202:25: S001 found module formatter
pandas/io/formats/format.py:1285:39: S001 found module formatter
pandas/io/formats/format.py:1450:39: S001 found module formatter
pandas/io/formats/format.py:1618:35: S001 found module formatter
pandas/io/formats/format.py:1793:27: S001 found module formatter
pandas/io/formats/format.py:1794:42: S001 found module formatter
pandas/io/formats/format.py:1810:24: S001 found module formatter
pandas/io/formats/format.py:1813:24: S001 found module formatter
pandas/io/formats/format.py:1827:35: S001 found module formatter
pandas/io/formats/format.py:1831:35: S001 found module formatter
pandas/io/formats/format.py:1867:25: S001 found module formatter
pandas/io/formats/format.py:1929:28: S001 found module formatter
pandas/io/formats/format.py:1958:28: S001 found module formatter
pandas/io/formats/format.py:1974:50: S001 found module formatter
pandas/io/formats/format.py:2026:50: S001 found module formatter
pandas/io/formats/format.py:2117:32: S001 found module formatter
pandas/io/formats/format.py:2207:32: S001 found module formatter
pandas/io/formats/format.py:2281:19: S001 found module formatter
pandas/io/formats/format.py:2283:19: S001 found module formatter
pandas/io/formats/format.py:2286:19: S001 found module formatter
pandas/io/formats/format.py:2294:19: S001 found module formatter
pandas/io/formats/format.py:2388:26: S001 found module formatter
pandas/io/formats/format.py:2390:26: S001 found module formatter
pandas/io/formats/format.py:2399:21: S001 found module formatter
pandas/io/formats/printing.py:126:12: S001 found module formatter
pandas/io/formats/printing.py:145:22: S001 found module formatter
pandas/io/formats/printing.py:152:16: S001 found module formatter
pandas/io/formats/printing.py:154:16: S001 found module formatter
pandas/io/formats/printing.py:227:18: S001 found module formatter
pandas/io/formats/style.py:233:19: S001 found module formatter
pandas/io/formats/style.py:243:46: S001 found module formatter
pandas/io/formats/style.py:243:61: S001 found module formatter
pandas/io/formats/style.py:267:23: S001 found module formatter
pandas/io/formats/style.py:284:43: S001 found module formatter
pandas/io/formats/style.py:284:58: S001 found module formatter
pandas/io/formats/style.py:301:35: S001 found module formatter
pandas/io/formats/style.py:301:48: S001 found module formatter
pandas/io/formats/style.py:320:47: S001 found module formatter
pandas/io/formats/style.py:774:16: S001 found module formatter
pandas/io/formats/style.py:842:21: S001 found module formatter
pandas/io/formats/terminal.py:127:11: S001 found module formatter
pandas/io/json/json.py:101:30: S001 found module formatter
pandas/io/json/json.py:112:30: S001 found module formatter
pandas/io/json/json.py:116:30: S001 found module formatter
pandas/io/json/json.py:136:20: S001 found module formatter
pandas/io/json/json.py:394:34: S001 found module formatter
pandas/io/json/normalize.py:270:30: S001 found module formatter
pandas/io/sas/sas7bdat.py:147:34: S001 found module formatter
pandas/io/sas/sas7bdat.py:679:34: S001 found module formatter
pandas/io/sas/sas_xport.py:80:0: S001 found module formatter
pandas/io/sas/sas_xport.py:98:0: S001 found module formatter
pandas/io/sas/sas_xport.py:159:26: S001 found module formatter
pandas/io/sas/sas_xport.py:310:12: S001 found module formatter
pandas/io/sas/sas_xport.py:311:32: S001 found module formatter
pandas/io/sas/sas_xport.py:379:12: S001 found module formatter
pandas/io/sas/sas_xport.py:443:24: S001 found module formatter
pandas/plotting/_converter.py:67:30: S001 found module formatter
pandas/plotting/_converter.py:169:22: S001 found module formatter
pandas/plotting/_converter.py:354:32: S001 found module formatter
pandas/plotting/_converter.py:359:16: S001 found module formatter
pandas/plotting/_converter.py:485:34: S001 found module formatter
pandas/plotting/_converter.py:508:30: S001 found module formatter
pandas/plotting/_converter.py:545:19: S001 found module formatter
pandas/plotting/_converter.py:560:36: S001 found module formatter
pandas/plotting/_converter.py:562:36: S001 found module formatter
pandas/plotting/_converter.py:574:38: S001 found module formatter
pandas/plotting/_converter.py:577:38: S001 found module formatter
pandas/plotting/_converter.py:587:41: S001 found module formatter
pandas/plotting/_converter.py:590:38: S001 found module formatter
pandas/plotting/_converter.py:708:33: S001 found module formatter
pandas/plotting/_converter.py:710:33: S001 found module formatter
pandas/plotting/_converter.py:731:19: S001 found module formatter
pandas/plotting/_converter.py:750:26: S001 found module formatter
pandas/plotting/_converter.py:763:23: S001 found module formatter
pandas/plotting/_converter.py:763:44: S001 found module formatter
pandas/plotting/_converter.py:768:26: S001 found module formatter
pandas/plotting/_converter.py:778:33: S001 found module formatter
pandas/plotting/_converter.py:780:33: S001 found module formatter
pandas/plotting/_converter.py:801:19: S001 found module formatter
pandas/plotting/_converter.py:825:33: S001 found module formatter
pandas/plotting/_converter.py:827:33: S001 found module formatter
pandas/plotting/_converter.py:845:17: S001 found module formatter
pandas/plotting/_converter.py:847:18: S001 found module formatter
pandas/plotting/_converter.py:867:18: S001 found module formatter
pandas/plotting/_core.py:657:36: S001 found module formatter
pandas/plotting/_core.py:728:25: S001 found module formatter
pandas/plotting/_core.py:740:19: S001 found module formatter
pandas/plotting/_core.py:1201:36: S001 found module formatter
pandas/plotting/_core.py:1398:24: S001 found module formatter
pandas/plotting/_core.py:1660:26: S001 found module formatter
pandas/plotting/_core.py:1668:30: S001 found module formatter
pandas/plotting/_core.py:2436:18: S001 found module formatter
pandas/plotting/_misc.py:528:19: S001 found module formatter
pandas/plotting/_style.py:164:15: S001 found module formatter
pandas/plotting/_style.py:199:30: S001 found module formatter
pandas/plotting/_style.py:210:30: S001 found module formatter
pandas/plotting/_tools.py:87:30: S001 found module formatter
pandas/stats/moments.py:282:15: S001 found module formatter
pandas/stats/moments.py:304:15: S001 found module formatter
pandas/stats/moments.py:461:23: S001 found module formatter
pandas/stats/moments.py:463:37: S001 found module formatter
pandas/tests/test_categorical.py:1664:31: S001 found module formatter
pandas/tests/test_categorical.py:1667:31: S001 found module formatter
pandas/tests/test_categorical.py:1673:41: S001 found module formatter
pandas/tests/test_categorical.py:1677:44: S001 found module formatter
pandas/tests/test_expressions.py:107:30: S001 found module formatter
pandas/tests/test_expressions.py:146:30: S001 found module formatter
pandas/tests/test_expressions.py:147:30: S001 found module formatter
pandas/tests/test_expressions.py:391:37: S001 found module formatter
pandas/tests/test_nanops.py:207:34: S001 found module formatter
pandas/tests/test_nanops.py:208:34: S001 found module formatter
pandas/tests/test_nanops.py:208:57: S001 found module formatter
pandas/tests/test_nanops.py:236:26: S001 found module formatter
pandas/tests/test_nanops.py:236:49: S001 found module formatter
pandas/tests/test_nanops.py:237:26: S001 found module formatter
pandas/tests/test_nanops.py:310:30: S001 found module formatter
pandas/tests/test_nanops.py:611:30: S001 found module formatter
pandas/tests/test_nanops.py:659:30: S001 found module formatter
pandas/tests/test_panel.py:347:34: S001 found module formatter
pandas/tests/test_panel.py:353:34: S001 found module formatter
pandas/tests/test_panel.py:2221:29: S001 found module formatter
pandas/tests/test_panel.py:2275:34: S001 found module formatter
pandas/tests/test_resample.py:988:30: S001 found module formatter
pandas/tests/test_resample.py:2334:52: S001 found module formatter
pandas/tests/test_resample.py:2402:61: S001 found module formatter
pandas/tests/test_resample.py:2523:61: S001 found module formatter
pandas/tests/test_resample.py:2540:51: S001 found module formatter
pandas/tests/test_resample.py:2541:35: S001 found module formatter
pandas/tests/test_resample.py:2546:40: S001 found module formatter
pandas/tests/test_resample.py:3134:41: S001 found module formatter
pandas/tests/test_strings.py:2288:23: S001 found module formatter
pandas/tests/test_window.py:1520:18: S001 found module formatter
pandas/tests/computation/test_eval.py:312:20: S001 found module formatter
pandas/tests/computation/test_eval.py:708:27: S001 found module formatter
pandas/tests/computation/test_eval.py:712:27: S001 found module formatter
pandas/tests/computation/test_eval.py:717:27: S001 found module formatter
pandas/tests/computation/test_eval.py:761:20: S001 found module formatter
pandas/tests/dtypes/test_dtypes.py:230:37: S001 found module formatter
pandas/tests/dtypes/test_inference.py:1028:48: S001 found module formatter
pandas/tests/frame/test_api.py:78:30: S001 found module formatter
pandas/tests/frame/test_api.py:82:30: S001 found module formatter
pandas/tests/frame/test_constructors.py:203:21: S001 found module formatter
pandas/tests/frame/test_constructors.py:1594:35: S001 found module formatter
pandas/tests/frame/test_constructors.py:1611:35: S001 found module formatter
pandas/tests/frame/test_indexing.py:2795:38: S001 found module formatter
pandas/tests/frame/test_indexing.py:2798:48: S001 found module formatter
pandas/tests/frame/test_indexing.py:2852:37: S001 found module formatter
pandas/tests/frame/test_indexing.py:2855:47: S001 found module formatter
pandas/tests/frame/test_operators.py:214:18: S001 found module formatter
pandas/tests/frame/test_operators.py:225:18: S001 found module formatter
pandas/tests/frame/test_operators.py:238:15: S001 found module formatter
pandas/tests/frame/test_operators.py:239:16: S001 found module formatter
pandas/tests/frame/test_operators.py:418:39: S001 found module formatter
pandas/tests/frame/test_query_eval.py:487:26: S001 found module formatter
pandas/tests/frame/test_query_eval.py:711:17: S001 found module formatter
pandas/tests/frame/test_query_eval.py:1016:28: S001 found module formatter
pandas/tests/frame/test_repr_info.py:256:20: S001 found module formatter
pandas/tests/frame/test_timeseries.py:148:30: S001 found module formatter
pandas/tests/frame/test_timeseries.py:164:30: S001 found module formatter
pandas/tests/frame/test_to_csv.py:633:21: S001 found module formatter
pandas/tests/groupby/test_aggregate.py:809:30: S001 found module formatter
pandas/tests/groupby/test_aggregate.py:830:30: S001 found module formatter
pandas/tests/groupby/test_aggregate.py:864:31: S001 found module formatter
pandas/tests/groupby/test_bin_groupby.py:96:33: S001 found module formatter
pandas/tests/groupby/test_filters.py:72:37: S001 found module formatter
pandas/tests/groupby/test_filters.py:90:41: S001 found module formatter
pandas/tests/groupby/test_filters.py:106:43: S001 found module formatter
pandas/tests/groupby/test_filters.py:115:43: S001 found module formatter
pandas/tests/groupby/test_filters.py:123:37: S001 found module formatter
pandas/tests/groupby/test_filters.py:127:43: S001 found module formatter
pandas/tests/groupby/test_filters.py:134:37: S001 found module formatter
pandas/tests/groupby/test_filters.py:139:43: S001 found module formatter
pandas/tests/groupby/test_filters.py:166:37: S001 found module formatter
pandas/tests/groupby/test_groupby.py:1587:33: S001 found module formatter
pandas/tests/groupby/test_groupby.py:2028:36: S001 found module formatter
pandas/tests/groupby/test_groupby.py:3529:30: S001 found module formatter
pandas/tests/groupby/test_groupby.py:3722:26: S001 found module formatter
pandas/tests/groupby/test_groupby.py:3722:34: S001 found module formatter
pandas/tests/groupby/test_groupby.py:3722:43: S001 found module formatter
pandas/tests/groupby/test_groupby.py:3727:42: S001 found module formatter
pandas/tests/indexes/common.py:228:52: S001 found module formatter
pandas/tests/indexes/datetimelike.py:19:20: S001 found module formatter
pandas/tests/indexes/datetimelike.py:27:20: S001 found module formatter
pandas/tests/indexes/test_numeric.py:176:31: S001 found module formatter
pandas/tests/indexes/datetimes/test_datetime.py:216:48: S001 found module formatter
pandas/tests/indexes/period/test_construction.py:308:17: S001 found module formatter
pandas/tests/indexes/period/test_period.py:225:48: S001 found module formatter
pandas/tests/indexes/period/test_tools.py:339:20: S001 found module formatter
pandas/tests/indexes/timedeltas/test_timedelta.py:471:48: S001 found module formatter
pandas/tests/indexing/common.py:17:13: S001 found module formatter
pandas/tests/indexing/common.py:101:38: S001 found module formatter
pandas/tests/indexing/common.py:184:22: S001 found module formatter
pandas/tests/indexing/common.py:232:34: S001 found module formatter
pandas/tests/indexing/test_iloc.py:561:29: S001 found module formatter
pandas/tests/indexing/test_ix.py:300:43: S001 found module formatter
pandas/tests/indexing/test_ix.py:301:22: S001 found module formatter
pandas/tests/indexing/test_ix.py:307:43: S001 found module formatter
pandas/tests/indexing/test_ix.py:308:22: S001 found module formatter
pandas/tests/indexing/test_loc.py:24:29: S001 found module formatter
pandas/tests/internals/test_internals.py:89:30: S001 found module formatter
pandas/tests/internals/test_internals.py:122:26: S001 found module formatter
pandas/tests/io/generate_legacy_storage_files.py:238:11: S001 found module formatter
pandas/tests/io/generate_legacy_storage_files.py:254:11: S001 found module formatter
pandas/tests/io/test_excel.py:632:25: S001 found module formatter
pandas/tests/io/test_excel.py:1055:28: S001 found module formatter
pandas/tests/io/test_excel.py:1981:25: S001 found module formatter
pandas/tests/io/test_excel.py:2097:25: S001 found module formatter
pandas/tests/io/test_excel.py:2484:19: S001 found module formatter
pandas/tests/io/test_excel.py:2529:19: S001 found module formatter
pandas/tests/io/test_html.py:670:38: S001 found module formatter
pandas/tests/io/test_html.py:671:39: S001 found module formatter
pandas/tests/io/test_packers.py:96:21: S001 found module formatter
pandas/tests/io/test_pickle.py:48:34: S001 found module formatter
pandas/tests/io/test_pickle.py:57:34: S001 found module formatter
pandas/tests/io/test_pickle.py:321:12: S001 found module formatter
pandas/tests/io/test_pickle.py:534:37: S001 found module formatter
pandas/tests/io/test_pytables.py:139:21: S001 found module formatter
pandas/tests/io/test_pytables.py:651:32: S001 found module formatter
pandas/tests/io/test_pytables.py:688:18: S001 found module formatter
pandas/tests/io/test_pytables.py:700:28: S001 found module formatter
pandas/tests/io/test_pytables.py:1281:20: S001 found module formatter
pandas/tests/io/test_pytables.py:1284:20: S001 found module formatter
pandas/tests/io/test_pytables.py:1386:31: S001 found module formatter
pandas/tests/io/test_pytables.py:2227:46: S001 found module formatter
pandas/tests/io/test_pytables.py:3195:35: S001 found module formatter
pandas/tests/io/test_pytables.py:3197:40: S001 found module formatter
pandas/tests/io/test_pytables.py:3201:26: S001 found module formatter
pandas/tests/io/test_pytables.py:3269:45: S001 found module formatter
pandas/tests/io/test_pytables.py:3277:27: S001 found module formatter
pandas/tests/io/test_pytables.py:3361:34: S001 found module formatter
pandas/tests/io/test_pytables.py:3379:43: S001 found module formatter
pandas/tests/io/test_pytables.py:3452:35: S001 found module formatter
pandas/tests/io/test_pytables.py:3488:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3494:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3500:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3520:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3527:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3534:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3557:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3565:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3573:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3591:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3614:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3622:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3632:21: S001 found module formatter
pandas/tests/io/test_pytables.py:3650:21: S001 found module formatter
pandas/tests/io/test_pytables.py:4067:67: S001 found module formatter
pandas/tests/io/test_pytables.py:4135:63: S001 found module formatter
pandas/tests/io/test_pytables.py:4160:63: S001 found module formatter
pandas/tests/io/test_pytables.py:4181:63: S001 found module formatter
pandas/tests/io/test_pytables.py:4201:63: S001 found module formatter
pandas/tests/io/test_pytables.py:4362:21: S001 found module formatter
pandas/tests/io/test_pytables.py:4363:23: S001 found module formatter
pandas/tests/io/test_pytables.py:4695:13: S001 found module formatter
pandas/tests/io/test_pytables.py:4816:20: S001 found module formatter
pandas/tests/io/test_pytables.py:5193:43: S001 found module formatter
pandas/tests/io/test_pytables.py:5197:43: S001 found module formatter
pandas/tests/io/test_pytables.py:5202:43: S001 found module formatter
pandas/tests/io/test_pytables.py:5448:25: S001 found module formatter
pandas/tests/io/test_sql.py:191:21: S001 found module formatter
pandas/tests/io/test_sql.py:211:27: S001 found module formatter
pandas/tests/io/test_sql.py:350:13: S001 found module formatter
pandas/tests/io/test_sql.py:1084:26: S001 found module formatter
pandas/tests/io/test_sql.py:1959:13: S001 found module formatter
pandas/tests/io/test_sql.py:1963:17: S001 found module formatter
pandas/tests/io/test_sql.py:1976:34: S001 found module formatter
pandas/tests/io/test_sql.py:1980:26: S001 found module formatter
pandas/tests/io/test_sql.py:2043:21: S001 found module formatter
pandas/tests/io/test_sql.py:2053:26: S001 found module formatter
pandas/tests/io/test_sql.py:2054:20: S001 found module formatter
pandas/tests/io/test_sql.py:2055:24: S001 found module formatter
pandas/tests/io/test_sql.py:2056:33: S001 found module formatter
pandas/tests/io/test_sql.py:2057:35: S001 found module formatter
pandas/tests/io/test_sql.py:2058:22: S001 found module formatter
pandas/tests/io/test_sql.py:2059:20: S001 found module formatter
pandas/tests/io/test_sql.py:2061:27: S001 found module formatter
pandas/tests/io/test_sql.py:2062:21: S001 found module formatter
pandas/tests/io/test_sql.py:2078:12: S001 found module formatter
pandas/tests/io/test_sql.py:2252:22: S001 found module formatter
pandas/tests/io/test_sql.py:2570:22: S001 found module formatter
pandas/tests/io/formats/test_css.py:72:21: S001 found module formatter
pandas/tests/io/formats/test_css.py:76:21: S001 found module formatter
pandas/tests/io/formats/test_css.py:80:21: S001 found module formatter
pandas/tests/io/formats/test_css.py:84:21: S001 found module formatter
pandas/tests/io/formats/test_css.py:89:25: S001 found module formatter
pandas/tests/io/formats/test_css.py:130:17: S001 found module formatter
pandas/tests/io/formats/test_css.py:131:15: S001 found module formatter
pandas/tests/io/formats/test_css.py:133:15: S001 found module formatter
pandas/tests/io/formats/test_css.py:152:21: S001 found module formatter
pandas/tests/io/formats/test_css.py:177:22: S001 found module formatter
pandas/tests/io/formats/test_css.py:185:21: S001 found module formatter
pandas/tests/io/formats/test_format.py:316:22: S001 found module formatter
pandas/tests/io/formats/test_format.py:468:41: S001 found module formatter
pandas/tests/io/formats/test_format.py:469:43: S001 found module formatter
pandas/tests/io/formats/test_format.py:470:44: S001 found module formatter
pandas/tests/io/formats/test_format.py:503:68: S001 found module formatter
pandas/tests/io/formats/test_format.py:947:20: S001 found module formatter
pandas/tests/io/formats/test_format.py:1059:20: S001 found module formatter
pandas/tests/io/formats/test_format.py:1177:53: S001 found module formatter
pandas/tests/io/formats/test_format.py:1272:12: S001 found module formatter
pandas/tests/io/formats/test_format.py:1675:30: S001 found module formatter
pandas/tests/io/formats/test_format.py:2179:12: S001 found module formatter
pandas/tests/io/formats/test_style.py:25:31: S001 found module formatter
pandas/tests/io/formats/test_style.py:217:24: S001 found module formatter
pandas/tests/io/formats/test_style.py:603:55: S001 found module formatter
pandas/tests/io/formats/test_to_html.py:1438:51: S001 found module formatter
pandas/tests/io/formats/test_to_latex.py:102:40: S001 found module formatter
pandas/tests/io/formats/test_to_latex.py:103:42: S001 found module formatter
pandas/tests/io/formats/test_to_latex.py:104:43: S001 found module formatter
pandas/tests/io/formats/test_to_latex.py:106:46: S001 found module formatter
pandas/tests/io/json/test_ujson.py:397:24: S001 found module formatter
pandas/tests/io/json/test_ujson.py:404:20: S001 found module formatter
pandas/tests/io/json/test_ujson.py:411:20: S001 found module formatter
pandas/tests/io/json/test_ujson.py:859:13: S001 found module formatter
pandas/tests/io/json/test_ujson.py:860:13: S001 found module formatter
pandas/tests/io/json/test_ujson.py:861:13: S001 found module formatter
pandas/tests/io/msgpack/test_case.py:9:9: S001 found module formatter
pandas/tests/io/msgpack/test_extension.py:49:25: S001 found module formatter
pandas/tests/io/msgpack/test_seq.py:10:24: S001 found module formatter
pandas/tests/io/parser/common.py:658:25: S001 found module formatter
pandas/tests/io/parser/common.py:679:16: S001 found module formatter
pandas/tests/io/parser/common.py:718:16: S001 found module formatter
pandas/tests/io/parser/common.py:1652:16: S001 found module formatter
pandas/tests/io/parser/multithread.py:74:18: S001 found module formatter
pandas/tests/io/parser/skiprows.py:206:30: S001 found module formatter
pandas/tests/io/parser/test_read_fwf.py:151:32: S001 found module formatter
pandas/tests/io/parser/test_unsupported.py:102:20: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:16:48: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:38:52: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:46:52: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:60:52: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:74:57: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:85:48: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:94:56: S001 found module formatter
pandas/tests/io/sas/test_sas7bdat.py:105:44: S001 found module formatter
pandas/tests/plotting/test_series.py:855:42: S001 found module formatter
pandas/tests/plotting/test_series.py:858:16: S001 found module formatter
pandas/tests/reshape/test_concat.py:1384:45: S001 found module formatter
pandas/tests/reshape/test_concat.py:1385:47: S001 found module formatter
pandas/tests/reshape/test_concat.py:1386:37: S001 found module formatter
pandas/tests/reshape/test_concat.py:1392:51: S001 found module formatter
pandas/tests/reshape/test_concat.py:1396:51: S001 found module formatter
pandas/tests/reshape/test_concat.py:1397:51: S001 found module formatter
pandas/tests/reshape/test_join.py:750:38: S001 found module formatter
pandas/tests/reshape/test_join.py:761:38: S001 found module formatter
pandas/tests/reshape/test_reshape.py:691:29: S001 found module formatter
pandas/tests/reshape/test_reshape.py:692:24: S001 found module formatter
pandas/tests/reshape/test_reshape.py:739:29: S001 found module formatter
pandas/tests/reshape/test_reshape.py:740:24: S001 found module formatter
pandas/tests/scalar/test_period.py:56:20: S001 found module formatter
pandas/tests/scalar/test_period.py:70:20: S001 found module formatter
pandas/tests/scalar/test_period.py:79:22: S001 found module formatter
pandas/tests/scalar/test_period.py:81:24: S001 found module formatter
pandas/tests/scalar/test_timestamp.py:343:40: S001 found module formatter
pandas/tests/scalar/test_timestamp.py:349:60: S001 found module formatter
pandas/tests/series/test_analytics.py:364:31: S001 found module formatter
pandas/tests/series/test_analytics.py:728:22: S001 found module formatter
pandas/tests/series/test_api.py:150:14: S001 found module formatter
pandas/tests/series/test_constructors.py:384:48: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:38:27: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:38:46: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:39:27: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:39:46: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:63:27: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:63:52: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:64:27: S001 found module formatter
pandas/tests/sparse/test_arithmetics.py:64:52: S001 found module formatter
pandas/tests/sparse/test_frame.py:780:54: S001 found module formatter
pandas/tests/sparse/test_indexing.py:28:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:29:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:33:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:34:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:38:40: S001 found module formatter
pandas/tests/sparse/test_indexing.py:79:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:80:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:84:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:85:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:89:40: S001 found module formatter
pandas/tests/sparse/test_indexing.py:131:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:132:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:136:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:137:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:141:44: S001 found module formatter
pandas/tests/sparse/test_indexing.py:156:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:157:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:161:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:162:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:166:40: S001 found module formatter
pandas/tests/sparse/test_indexing.py:181:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:182:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:186:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:187:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:472:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:473:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:477:25: S001 found module formatter
pandas/tests/sparse/test_indexing.py:478:20: S001 found module formatter
pandas/tests/sparse/test_indexing.py:482:40: S001 found module formatter
pandas/tests/sparse/test_indexing.py:530:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:531:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:535:29: S001 found module formatter
pandas/tests/sparse/test_indexing.py:536:24: S001 found module formatter
pandas/tests/sparse/test_indexing.py:540:44: S001 found module formatter
pandas/tests/sparse/test_libsparse.py:608:36: S001 found module formatter
pandas/tests/sparse/test_libsparse.py:612:18: S001 found module formatter
pandas/tests/sparse/test_series.py:609:49: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:570:28: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:588:53: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:595:57: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:628:53: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:632:53: S001 found module formatter
pandas/tests/tseries/test_frequencies.py:636:53: S001 found module formatter
pandas/tests/tseries/test_offsets.py:2185:33: S001 found module formatter
pandas/tests/tseries/test_offsets.py:2249:20: S001 found module formatter
pandas/tests/tseries/test_offsets.py:4310:30: S001 found module formatter
pandas/tests/tseries/test_offsets.py:4533:37: S001 found module formatter
pandas/tests/util/test_util.py:215:45: S001 found module formatter
pandas/tseries/frequencies.py:215:23: S001 found module formatter
pandas/tseries/frequencies.py:978:16: S001 found module formatter
pandas/tseries/frequencies.py:1062:16: S001 found module formatter
pandas/tseries/frequencies.py:1218:12: S001 found module formatter
pandas/tseries/frequencies.py:1218:24: S001 found module formatter
pandas/tseries/frequencies.py:1245:12: S001 found module formatter
pandas/tseries/offsets.py:1297:21: S001 found module formatter
pandas/tseries/offsets.py:1316:15: S001 found module formatter
pandas/tseries/offsets.py:1355:27: S001 found module formatter
pandas/tseries/offsets.py:1356:20: S001 found module formatter
pandas/tseries/offsets.py:1375:21: S001 found module formatter
pandas/tseries/offsets.py:2803:16: S001 found module formatter
pandas/tseries/offsets.py:2805:18: S001 found module formatter
pandas/tseries/offsets.py:2811:12: S001 found module formatter
pandas/tseries/offsets.py:2813:14: S001 found module formatter
pandas/tseries/util.py:103:26: S001 found module formatter
pandas/tseries/util.py:104:41: S001 found module formatter
pandas/tseries/util.py:104:56: S001 found module formatter

@cbertinato
Copy link
Contributor

@jschendel I have some changes for this issue. Can we coordinate so I don't make a request for anything you've already done or are working on?

@jschendel
Copy link
Member

@cbertinato Sure, just let me know what you're working on/want to work on and I'll steer clear. I saw that you made a commit for interval.pyx, so I've been avoiding working on that, but that's about it.

I don't really have a backlog of stuff I've started working on but haven't submitted a PR for; been working on this in (somewhat) coherent chunks and submit PRs as I finish the chunks. I just started some work on missing.py/nanops.py/ops.py, and that's all that hasn't already been submitted as a PR.

I don't have a set plan for what I'm going to do and when either. I've mostly been trying to read over the pandas codebase to get a better understanding of it, and figured I'd do something productive along the way!

@cbertinato
Copy link
Contributor

Sounds good. The only I'm working is getting changes to io through testing. No plan here either, so I'll just keep in touch when I start working on something else.

@cbertinato
Copy link
Contributor

cbertinato commented Aug 25, 2017

I'd like to get your opinions on an issue that arose while working through io/formats/format.py.

Here is one example where a format string is passed to a function (1939):

        if self.float_format is None and self.fixed_width:
            float_format = '% .{digits:d}f'.format(digits=self.digits)
        else:
            float_format = self.float_format

        formatted_values = format_values_with(float_format)

which gets passed on to another function (1876):

if float_format:
            def base_formatter(v):
                return (float_format % v) if notna(v) else self.na_rep

The issue is that if the user specifies anything other than None, then changing that float_format % v to use .format would break with the old format string style.

One way to move all of the internal code to .format could be to write a function to translate the old format string to new format strings so we can retain old format strings when they get passed to functions by a user.

Thoughts on how best to proceed?

@jschendel
Copy link
Member

I think you can get around it with functools.partial. Something along the lines of:

from functools import partial

if self.float_format is None and self.fixed_width:
    float_format = partial('{value:.{digits:d}f}'.format, digits=self.digits)

and

def base_formatter(v):
    return float_format(value=v) if notna(v) else self.na_rep

cbertinato pushed a commit to cbertinato/pandas that referenced this issue Aug 26, 2017
Progress toward issue pandas-dev#16130. Converted old string formatting to new string formatting in io/formats/format.py.
cbertinato pushed a commit to cbertinato/pandas that referenced this issue Aug 27, 2017
Progress toward issue pandas-dev#16130. Converted old string formatting to new string formatting in core/indexing.py.
cbertinato pushed a commit to cbertinato/pandas that referenced this issue Aug 27, 2017
Progress toward issue pandas-dev#16130. Converted old string formatting to new string formatting in core/indexing.py.
cbertinato pushed a commit to cbertinato/pandas that referenced this issue Aug 27, 2017
Progress toward issue pandas-dev#16130. Converted old string formatting to new string formatting in core/indexing.py.
cbertinato pushed a commit to cbertinato/pandas that referenced this issue Aug 28, 2017
Progress toward issue pandas-dev#16130. Converted old string formatting to new string formatting in io/formats/format.py.
makeajourney added a commit to makeajourney/pandas that referenced this issue Dec 27, 2018
makeajourney added a commit to makeajourney/pandas that referenced this issue Dec 27, 2018
makeajourney added a commit to makeajourney/pandas that referenced this issue Dec 27, 2018
makeajourney added a commit to makeajourney/pandas that referenced this issue Jan 10, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Jan 11, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Jan 11, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Jan 11, 2019
jreback pushed a commit that referenced this issue Jan 11, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Jan 31, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Feb 2, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Feb 20, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Feb 22, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this issue Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this issue Feb 28, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Mar 19, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Mar 19, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Apr 20, 2019
makeajourney added a commit to makeajourney/pandas that referenced this issue Apr 23, 2019
@pv8473h12
Copy link
Contributor

I think we can close this issue. I could not see any outstanding cases when performing a grep search.

@mroeschke
Copy link
Member

Closing in favor of #29547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Code Style Code style, linting, code_checks good first issue
Projects
None yet
Development

No branches or pull requests

8 participants