How to replicate a pivot_table WITHOUT using a pivot table
#### Code Sample, a copy-pastable example if possible

```python
# Your code here

idx = [np.nan, 'low', 'high', 'low', np.nan]                                                                                                                        
col = [np.nan, 'A', 'B', np.nan, 'A']
 df = pd.DataFrame({
     "In": pd.Categorical(idx, categories=['low', 'high'], ordered=True),
     "Col": pd.Categorical(col, categories=['A', 'B'], ordered=True),
     "Val": range(1, 6)})

 df1=df.pivot_table(index="In", columns="Col", values="Val") 
In [25]: exp1=pd.DataFrame([[2,np.nan],[np.nan,3]],columns=['A','B'],index=pd.In
    ...: dex(pd.Categorical.from_codes([0,1],categories=['low','high'],ordered=T
    ...: rue),name='In'))

In [28]: exp1
Out[28]: 
        A    B
In            
low   2.0  NaN
high  NaN  3.0

In [29]: df1
Out[29]: 
Col     A    B
In            
low   2.0  NaN
high  NaN  3.0


```


#### Problem description

Okay, first of all it's more of a usage question.
I want to know if there is any way to replicate an `pivot_table` as defined above (please bear with me on the horrible style ints) without actually using `pivot_table` ? 
Basically i need that `col` in my `exp1` like shown in `df1`.




<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.13.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_IN
LOCALE: en_IN.ISO8859-1

pandas: 0.24.0.dev0+83.g415012f
pytest: None
pip: 8.1.1
setuptools: 20.7.0
Cython: 0.28.3
numpy: 1.14.4
scipy: 1.1.0
pyarrow: 0.9.0
xarray: None
IPython: 6.4.0
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.7.3
lxml: None
bs4: 4.4.1
html5lib: 0.999
sqlalchemy: 1.2.8
pymysql: None
psycopg2: None
jinja2: 2.8
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None


</details>
