Skip to content

Commit 463aa0d

Browse files
committed
Merge pull request #6646 from dsm054/fix_indentation_errors
CLN: Fix many indentation errors found in #6643.
2 parents fd677ae + 80fc82e commit 463aa0d

File tree

14 files changed

+226
-226
lines changed

14 files changed

+226
-226
lines changed

doc/make.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ def upload_prev(ver, doc_root='./'):
7777
raise SystemExit('Upload PDF to %s from %s failed' % (ver, doc_root))
7878

7979
def build_pandas():
80-
os.chdir('..')
81-
os.system('python setup.py clean')
82-
os.system('python setup.py build_ext --inplace')
83-
os.chdir('doc')
80+
os.chdir('..')
81+
os.system('python setup.py clean')
82+
os.system('python setup.py build_ext --inplace')
83+
os.chdir('doc')
8484

8585
def build_prev(ver):
8686
if os.system('git checkout v%s' % ver) != 1:

pandas/computation/tests/test_eval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ def testit(r_idx_type, c_idx_type, index_name):
819819
with warnings.catch_warnings(record=True):
820820
warnings.simplefilter('always', RuntimeWarning)
821821
for r_idx_type, c_idx_type, index_name in args:
822-
testit(r_idx_type, c_idx_type, index_name)
822+
testit(r_idx_type, c_idx_type, index_name)
823823

824824
def test_basic_frame_series_alignment(self):
825825
for engine, parser in ENGINES_PARSERS:

pandas/core/format.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -539,18 +539,18 @@ def write(buf, frame, column_format, strcols, longtable=False):
539539
buf.write('\\bottomrule\n')
540540
buf.write('\\endlastfoot\n')
541541
if self.escape:
542-
crow = [(x.replace('\\', '\\textbackslash') # escape backslashes first
543-
.replace('_', '\\_')
544-
.replace('%', '\\%')
545-
.replace('$', '\\$')
546-
.replace('#', '\\#')
547-
.replace('{', '\\{')
548-
.replace('}', '\\}')
549-
.replace('~', '\\textasciitilde')
550-
.replace('^', '\\textasciicircum')
551-
.replace('&', '\\&') if x else '{}') for x in row]
542+
crow = [(x.replace('\\', '\\textbackslash') # escape backslashes first
543+
.replace('_', '\\_')
544+
.replace('%', '\\%')
545+
.replace('$', '\\$')
546+
.replace('#', '\\#')
547+
.replace('{', '\\{')
548+
.replace('}', '\\}')
549+
.replace('~', '\\textasciitilde')
550+
.replace('^', '\\textasciicircum')
551+
.replace('&', '\\&') if x else '{}') for x in row]
552552
else:
553-
crow = [x if x else '{}' for x in row]
553+
crow = [x if x else '{}' for x in row]
554554
buf.write(' & '.join(crow))
555555
buf.write(' \\\\\n')
556556

@@ -2104,7 +2104,7 @@ def detect_console_encoding():
21042104

21052105
# when all else fails. this will usually be "ascii"
21062106
if not encoding or 'ascii' in encoding.lower():
2107-
encoding = sys.getdefaultencoding()
2107+
encoding = sys.getdefaultencoding()
21082108

21092109
# GH3360, save the reported defencoding at import time
21102110
# MPL backends may change it. Make available for debugging.

pandas/core/generic.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3598,10 +3598,10 @@ def pretty_name(x):
35983598
return '%.1f%%' % x
35993599

36003600
def describe_numeric_1d(series, percentiles):
3601-
return ([series.count(), series.mean(), series.std(),
3602-
series.min()] +
3603-
[series.quantile(x) for x in percentiles] +
3604-
[series.max()])
3601+
return ([series.count(), series.mean(), series.std(),
3602+
series.min()] +
3603+
[series.quantile(x) for x in percentiles] +
3604+
[series.max()])
36053605

36063606
def describe_categorical_1d(data):
36073607
names = ['count', 'unique']

pandas/core/groupby.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2218,9 +2218,9 @@ def transform(self, func, *args, **kwargs):
22182218

22192219
# may need to astype
22202220
try:
2221-
common_type = np.common_type(np.array(res), result)
2222-
if common_type != result.dtype:
2223-
result = result.astype(common_type)
2221+
common_type = np.common_type(np.array(res), result)
2222+
if common_type != result.dtype:
2223+
result = result.astype(common_type)
22242224
except:
22252225
pass
22262226

pandas/core/indexing.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1131,13 +1131,13 @@ def _getitem_axis(self, key, axis=0, validate_iterable=False):
11311131
raise NotImplementedError()
11321132

11331133
def _getbool_axis(self, key, axis=0):
1134-
labels = self.obj._get_axis(axis)
1135-
key = _check_bool_indexer(labels, key)
1136-
inds, = key.nonzero()
1137-
try:
1138-
return self.obj.take(inds, axis=axis, convert=False)
1139-
except Exception as detail:
1140-
raise self._exception(detail)
1134+
labels = self.obj._get_axis(axis)
1135+
key = _check_bool_indexer(labels, key)
1136+
inds, = key.nonzero()
1137+
try:
1138+
return self.obj.take(inds, axis=axis, convert=False)
1139+
except Exception as detail:
1140+
raise self._exception(detail)
11411141

11421142
def _get_slice_axis(self, slice_obj, axis=0):
11431143
""" this is pretty simple as we just have to deal with labels """
@@ -1193,7 +1193,7 @@ def _has_valid_type(self, key, axis):
11931193
)
11941194

11951195
elif com._is_bool_indexer(key):
1196-
return True
1196+
return True
11971197

11981198
elif _is_list_like(key):
11991199

pandas/core/internals.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ def eval(self, func, other, raise_on_error=True, try_cast=False):
824824
is_transposed = False
825825
if hasattr(other, 'ndim') and hasattr(values, 'ndim'):
826826
if values.ndim != other.ndim:
827-
is_transposed = True
827+
is_transposed = True
828828
else:
829829
if values.shape == other.shape[::-1]:
830830
is_transposed = True
@@ -2981,7 +2981,7 @@ def _is_indexed_like(self, other):
29812981
def equals(self, other):
29822982
self_axes, other_axes = self.axes, other.axes
29832983
if len(self_axes) != len(other_axes):
2984-
return False
2984+
return False
29852985
if not all (ax1.equals(ax2) for ax1, ax2 in zip(self_axes, other_axes)):
29862986
return False
29872987
self._consolidate_inplace()

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def _set_with(self, key, value):
672672
else:
673673
return self._set_values(key, value)
674674
elif key_type == 'boolean':
675-
self._set_values(key.astype(np.bool_), value)
675+
self._set_values(key.astype(np.bool_), value)
676676
else:
677677
self._set_labels(key, value)
678678

pandas/io/excel.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ def _parse_excel(self, sheetname=0, header=0, skiprows=None, skip_footer=0,
291291
year = (value.timetuple())[0:3]
292292
if ((not epoch1904 and year == (1899, 12, 31))
293293
or (epoch1904 and year == (1904, 1, 1))):
294-
value = datetime.time(value.hour,
295-
value.minute,
296-
value.second,
297-
value.microsecond)
294+
value = datetime.time(value.hour,
295+
value.minute,
296+
value.second,
297+
value.microsecond)
298298
else:
299299
# Use the xlrd <= 0.9.2 date handling.
300300
dt = xldate.xldate_as_tuple(value, epoch1904)

pandas/tests/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_isnull():
7575
# series
7676
for s in [tm.makeFloatSeries(),tm.makeStringSeries(),
7777
tm.makeObjectSeries(),tm.makeTimeSeries(),tm.makePeriodSeries()]:
78-
assert(isinstance(isnull(s), Series))
78+
assert(isinstance(isnull(s), Series))
7979

8080
# frame
8181
for df in [tm.makeTimeDataFrame(),tm.makePeriodFrame(),tm.makeMixedDataFrame()]:

0 commit comments

Comments
 (0)