BUG: A change between Python version 3.6.0 and 3.6.1 causes an apply lambda function with selective column processing to check every column
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

```python
import pandas as pd

test = pd.DataFrame([
  [1, {'c': 1}],
  [2, {'c': 2}],
  [3, {'c': 3}],
  [4, {'c': 4}],
  [5, {'c': 5}]
], columns=['A', 'B'])

print(test[['A', 'B']].apply(lambda x: x.nlargest(2, keep='all') if x.name in ['A'] else x.apply(lambda y: y['c']).nsmallest(2, keep='all')))
```

#### Problem description

On and after Python version 3.6.1, the above code crashes with the error: `TypeError: Cannot use method 'nlargest' with dtype object`. This happens because the `apply(lambda x` function is applying to both columns, even though the `if/else` check should only apply it to the specified column. I am not certain if this is a bug in Python itself, or if python changed and Pandas needs to update to match. I am starting here, though, because I believe the issue will be identified (and fixed if necessary) quicker. On previous versions, the following output is produced: 

#### Expected Output
```
>>> test[['A', 'B']].apply(lambda x: x.nlargest(2, keep='all') if x.name in ['A'] else x.apply(lambda y: y['c']).nsmallest(2, keep='all'))
     A    B
0  NaN  1.0
1  NaN  2.0
3  4.0  NaN
4  5.0  NaN
```

#### Output of ``pd.show_versions()``

<details>

```
INSTALLED VERSIONS
------------------
commit           : None
python           : 3.6.1.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.9.0-11-amd64
machine          : x86_64
processor        : 
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 1.0.5
numpy            : 1.19.1
pytz             : 2020.1
dateutil         : 2.8.1
pip              : 20.1.1
setuptools       : 49.2.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : None
IPython          : None
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : None
matplotlib       : None
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
pytest           : None
pyxlsb           : None
s3fs             : None
scipy            : None
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
xlsxwriter       : None
numba            : None
```

</details>
