df.apply function is executed twice when rows == 1
#### Code Sample, a copy-pastable example if possible

```python
import pandas as pd
def func(row):
    for col in row.keys():
        row[col]=row[col]+1
    return row

# func is applied twice , not expected
df = pd.DataFrame(data = [[0,0]],columns=['a','b'])
df.apply(func,axis=1)
print(df)

# func is applied once , expected
df = pd.DataFrame(data = [[0,0]]*2,columns=['a','b'])
df.apply(func,axis=1)
print(df)

```
I get the following output : 
```
   a  b
0  2  2

   a  b
0  1  1
1  1  1
```

#### Problem description
The function func is applied twice
The problem happens when the number of rows is equal to 1

#### Expected Output
```
   a  b
0  1  1

   a  b
0  1  1
1  1  1
```

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.14.65+
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.23.4
pytest: None
pip: 18.1
setuptools: 40.6.2
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: 1.2.14
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>
