Issue 1:
Code Sample, a copy-pastable example if possible

Link to StackOverflow example

Using pd.series works fine:

df = pd.DataFrame(np.random.randint(1, 10, (3, 3)), index=['one', 'one', 'two'], columns=['col1', 'col2', 'col3'])
new_data = pd.Series({'col1': 'new', 'col2': 'new', 'col3': 'new'})
df.iloc[0] = new_data

# resulting df looks like:

# col1 col2 col3
#one new new new
#one 9 6 1
#two 8 3 7

But if I try to add a dictionary instead, I get this:

new_data = {'col1': 'new', 'col2': 'new', 'col3': 'new'}
df.iloc[0] = new_data
#
# col1 col2 col3
#one col2 col3 col1
#one 2 1 7
#two 5 8 6

Problem description

Considering that a dataframe can be created using a dictionary, it seems odd that adding to a dataframe using a dictionary would result in shuffled columns when they have been explicitly labeled.

This seems like an unexpected behaviour which, although may not be a bug, doesn't seem like the optimal way of making this process function.

Expected Output

Adding a row to a dataframe using a dictionary which gives column headers results in the same thing as adding a row using pd.series

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-83-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: C
LANG: en_GB.UTF-8
LOCALE: None.None

pandas: 0.20.2

pytest: None

pip: 9.0.1

setuptools: 33.1.1.post20170320

Cython: None

numpy: 1.12.1

scipy: 0.19.0

xarray: None

IPython: 5.3.0

sphinx: 1.6.1

patsy: None

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 2.0.2

openpyxl: 2.4.7

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: None

lxml: 3.7.3

bs4: None

html5lib: 0.999

sqlalchemy: 1.1.5

pymysql: None

psycopg2: None

jinja2: 2.9.5

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
Code Sample, a copy-pastable example if possible

import numpy as np
import pandas as pd

persons = [
{
'name': ''.join([
np.random.choice([chr(x) for x in range(97, 97 + 26)])
for i in range(5)
]),
'age': np.random.randint(0, 100),
'sex': np.random.choice(['male', 'female']),
'job': np.random.choice(['staff', 'cook', 'student']),
'birthday': np.random.choice(pd.date_range('1990-01-01', '2010-01-01')),
'hobby': np.random.choice(['cs', 'war3', 'dota'])
}
for i in range(10)
]

df = pd.DataFrame(persons)
df.set_index('birthday', inplace=True)
print(df)
df.iloc[0] = {
'name': 'john',
'age': int(10),
'sex': 'male',
'hobby': 'nohobby',
'job': 'haha'
}
print(df)

Problem description

age hobby job name sex
birthday
2007-12-31 name age sex hobby job
2004-07-31 20 dota student uwxhn female
2001-10-22 34 war3 cook udknv female
2002-10-13 91 dota cook bofcv female
1992-05-25 54 war3 cook tcqew male
2009-09-02 95 war3 staff jcolr female
1998-12-15 61 war3 student dibkw female
2004-07-03 4 war3 student mntqh male
2000-06-08 88 war3 staff jknxm female
2006-10-19 82 cs student asrpz male

Have no idea why the keys are set to the rows.

Expected Output

age hobby job name sex
birthday
2007-12-31 10 nohobby haha john male
2004-07-31 20 dota student uwxhn female
2001-10-22 34 war3 cook udknv female
2002-10-13 91 dota cook bofcv female
1992-05-25 54 war3 cook tcqew male
2009-09-02 95 war3 staff jcolr female
1998-12-15 61 war3 student dibkw female
2004-07-03 4 war3 student mntqh male
2000-06-08 88 war3 staff jknxm female
2006-10-19 82 cs student asrpz male

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.1.final.0

python-bits: 64

OS: Darwin

OS-release: 16.6.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: en_US.UTF-8

LANG: en_US.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.20.1

pytest: 3.0.7

pip: 9.0.1

setuptools: 35.0.2

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

xarray: 0.9.5

IPython: 6.0.0

sphinx: 1.5.5

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: 1.2.0

tables: 3.4.2

numexpr: 2.6.2

feather: None

matplotlib: 2.0.2

openpyxl: 2.4.7

xlrd: 1.0.0

xlwt: None

xlsxwriter: None

lxml: 3.7.3

bs4: 4.6.0

html5lib: 0.999999999

sqlalchemy: 1.1.9

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None