pydata/pandas — pull request #3772 by zonca (2013-06-06 06:53:40+00:00)
Title: ENH: Provide a default key name in read_hdf and to_hdf

For convenience, provide a default name ("data") to quickly store and retrieve data from HDF5.

Now for csv:
```python
df3 = pd.DataFrame(np.random.randn(10, 5), columns=['a', 'b', 'c', 'd', 'e'])
df3.to_csv("df3.csv")
print df3.from_csv("df3.csv")
```
for HDF5:
```python
df3 = pd.DataFrame(np.random.randn(10, 5), columns=['a', 'b', 'c', 'd', 'e'])
df3.to_hdf("df3.h5", "data")
print pd.read_hdf("df3.h5", "data")
```

I would suggest to provide a default key name that would make it more convenient to read and write to HDF5 when it contains only one dataset.

In this PR:
```python
df3 = pd.DataFrame(np.random.randn(10, 5), columns=['a', 'b', 'c', 'd', 'e'])
df3.to_hdf("df3.h5")
print pd.read_hdf("df3.h5")
```
Instead I would not provide a default key in `pd.read_hdf` because it would break backward compatibility.