我有一组带有不同股票代码的数据,想知道每天每个代码有多少看涨和看跌信号。
我将如何使用Pandas?谢谢
Input:
Date Symbol Sentiment
5/2/19 GE Bullish
5/2/19 GE Bullish
5/2/19 GE Bearish
5/2/19 GE Bearish
6/2/19 GE Bullish
6/2/19 GE Bullish
6/2/19 GE Bullish
6/2/19 GE Bullish
6/2/19 GE Bullish
6/2/19 GE Bearish
6/2/19 GE Bearish
6/2/19 GE Bearish
Output:
Date Symbol Sentiment Bullish Sentiment Bearish
5/2/19 GE 2 2
6/2/19 GE 5 3