QST: In what circumstances that the pandas.DataFrame.agg works on mean, median ... but not on std function?
- [x] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.

- [x] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).

[https://stackoverflow.com/questions/67693185/pandas-dataframe-agg-does-not-work-with-np-std](https://stackoverflow.com/questions/67693185/pandas-dataframe-agg-does-not-work-with-np-std)

---

#### Question about pandas

I have a dataframe (containing sensor data) with the columns like ['ax', 'ay', 'az', 'gx', 'gy', 'gz']. I want to aggregate some columns with some functions. I set this goal through a dict variable like
`features_dict = {'ax': ['mean', 'std'], 'ay': ['max', 'mean', 'std', 'median']}`
in which each column will be aggregated with a different function set. 

I implement that by the following codes
```
features_dict = {'ax': ['mean', 'std'], 'ay': ['max', 'mean', 'std', 'median']}
for key in features_dict:
	df_agg = df.agg({key: features_dict[key]})
```

The returning result only has results for other functions except for **std**, and when I eliminate other functions except for std, or setting the `features_dict = {'ax': ['std]}`, it raises the error **ValueError("no results")**.

The error logs is like this:
```
Traceback (most recent call last):
File "C:\prediction_framework_django\predictions\predictor.py", line 112, in pre_aggregated_unseen_data
    agg_df = dataframe.agg({axis: [np.std]})
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\frame.py", line 7578, in aggregate
    result, how = self._aggregate(func, axis, *args, **kwargs)
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\frame.py", line 7609, in _aggregate
    return aggregate(self, arg, *args, **kwargs)
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\aggregation.py", line 582, in aggregate
    return agg_dict_like(obj, arg, _axis), True
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\aggregation.py", line 768, in agg_dict_like
    results = {key: obj._gotitem(key, ndim=1).agg(how) for key, how in arg.items()}
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\aggregation.py", line 768, in <dictcomp>
    results = {key: obj._gotitem(key, ndim=1).agg(how) for key, how in arg.items()}
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\series.py", line 3974, in aggregate
    result, how = aggregate(self, func, *args, **kwargs)
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\aggregation.py", line 586, in aggregate
    return agg_list_like(obj, arg, _axis=_axis), None
File "C:\prediction_framework_django\env\lib\site-packages\pandas\core\aggregation.py", line 672, in agg_list_like
    raise ValueError("no results")
ValueError: no results
```

I don't think that comes from the data in the data frame itself as it worked with other similar functions, so can someone give me the hint?
Thank you!
