SQL adding 2 query's to make one

This is the data I’m working with in my SQL database: Symbol | Close_Below AAPL 1 TSLA 0 AAPl 0 AAPL 1 SPY 0 TSLA 1 SPY 0 AAPL 1 SQL Query I’m using to count how many times a symbol is in the database: SELECT Symbol, count(*) as SymbolCount FROM data GROUP BY Symbol;… Read More SQL adding 2 query's to make one

I got an error when extracting data from a csv file by pandas

I’m trying to get a signal out of aapl data but i got this error import numpy as np import pandas as pd import matplotlib.pyplot as plt from datetime import datetime apple_stock = pd.read_csv(‘AAPL.csv’) apple_stock = apple_stock.set_index(pd.DatetimeIndex(apple_stock[‘Date’].values)) ma30 = pd.DataFrame() ma30[‘AM’] = apple_stock[‘Adj Close’].rolling(window=30).mean() ma100 = pd.DataFrame() ma100[‘AM’] = apple_stock[‘Adj Close’].rolling(window=100).mean() data = pd.DataFrame() data[‘AAPL’]… Read More I got an error when extracting data from a csv file by pandas

Creating a new file and add some text to it using bash

I’m making a basic installation script (my first to be precise) for LAMP, and I experienced some difficulties: I trying to put some configuration in a new file, in this case for ssl-params My humble code: cat > /etc/apache2/conf-available/ssl-params.conf << ENDOFFILE SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 SSLHonorCipherOrder On Header always set X-Frame-Options… Read More Creating a new file and add some text to it using bash

Highlighting Todays Work Day of the Week in an HTML Table using only CSS/Javascript/Jquery

I would like my computer to automatically highlight todays day of the week in a table row. The table has all the weekdays in a separate row, and has a fixed number of seven rows, starting with the least pleasant day of all days, Monday or Maandag in Dutch. Lets say its Tuesday today or… Read More Highlighting Todays Work Day of the Week in an HTML Table using only CSS/Javascript/Jquery

Split multiple columns into multiple columns, pandas

I have a dataframe df = pd.DataFrame({‘≤8’: {1: ‘3687 55.5’, 2: ‘838 66.5’, 3: ‘8905 66.9’}, ‘9–13’: {1: ‘2234 33.6’, 2: ‘419 33.3’, 3: ‘3362 25.2′}, ’14–15’: {1: ‘290 4.4’, 2: nan, 3: ‘473 3.6′}, ’16–17’: {1: ‘194 2.9’, 2: nan, 3: ‘252 1.9′}, ’18–20’: {1: ‘185 2.8’, 2: nan, 3: ‘184 1.4’}, ‘≥21’: {1:… Read More Split multiple columns into multiple columns, pandas