Parse commented data from Python requests with BSoup - python-3.x

I am trying to parse some data from Basketball-Reference, but so far I'm unable to do so. Here is my code for getting the raw html data
import requests
from bs4 import BeautifulSoup
url='https://www.basketball-reference.com/teams/DAL/2021/lineups/'
response=requests.get(url=url)
soup=BeautifulSoup(response.content,'html.parser')
>>soup.find(attrs={'id':"all_lineups_5-man_"}).find('table')
That last line gives an error, when it shouldn't. My guess is that it is happening because of the <!-- highlighted in yellow in the picture below. So my question is, how should I approach this?

You could loop through the comments, grab the tables, and then use pandas.
For example:
import pandas as pd
import requests
from bs4 import BeautifulSoup, Comment
from tabulate import tabulate
url = 'https://www.basketball-reference.com/teams/DAL/2021/lineups/'
response = requests.get(url)
soup = BeautifulSoup(
response.content, 'html.parser'
).find_all(text=lambda text: isinstance(text, Comment))
tables = [c for c in soup if "<div" in c]
frames = [pd.read_html(table, flavor="bs4") for table in tables]
print(tabulate(pd.concat(frames[-1])))
pd.concat(frames[-1]).to_csv("table_4.csv", index=False)
Output:
-- --- ------------------------------- ------ ----- ---- ---- ------ ---- ---- ------ ------ ----- ---- ------ ---- ----- ---- ----- ---- ----- ---- ---- ---- ---- ----
0 1 L. Dončić | T. Hardaway 435:01 1.9 1.8 -0.5 0.023 0.3 2.1 -0.012 0.025 -2 -3 0.012 -2.1 -3.9 -0.5 -3.9 -1.5 -3.2 0.8 -0.4 1.2 -1.1 -0.9
1 2 W. Cauley-Stein | L. Dončić 288:50 8.3 5.2 0.4 0.057 0.7 -1.3 0.032 0.06 -2.9 -3.8 -0.003 -0.6 1.2 5.3 1.2 2.5 5.5 0.6 -1.6 3 0.5 -0.8
2 3 L. Dončić | J. Richardson 266:22 -1.5 0 4.2 -0.023 -0.5 6.1 -0.071 -0.029 -1.1 -1 -0.01 -0.7 -3 -3.7 -3 -2.2 -5 -1.4 2.7 0.8 -4.4 -1.1
3 4 D. Finney-Smith | J. Richardson 252:38 -3.3 -0.5 5.1 -0.034 -0.4 5.8 -0.06 -0.04 -1.8 -2 -0.012 0.2 -1 -3.4 -1 -1.5 -3.5 0.3 0.2 0 -3.9 -1.7
4 5 T. Burke | L. Dončić 251:51 -2.2 3.2 1.1 0.03 -1.4 1.6 -0.052 0.021 -7.2 -9.5 -0.008 -3.8 -7 -1.4 -7 -2.8 -6.1 -3.6 0.3 1 -2.5 1.6
5 6 J. Brunson | T. Hardaway 246:37 -4.4 -2.9 -3.9 -0.012 -3.2 -3.8 -0.05 -0.027 4.5 3.7 0.06 -3.8 -8.1 -2.5 -8.1 -3.2 -7.2 -0.6 -1.2 0 -1.2 -1.6
6 7 T. Burke | J. Johnson 242:07 -2.5 2.3 -0.6 0.029 0.2 0.2 0.004 0.03 -7.2 -8.5 -0.042 -3.6 -7.1 -2.1 -7.1 -2.8 -6.2 -2.1 0 1.9 0 2.8
7 8 L. Dončić | D. Finney-Smith 236:07 -3.5 1.6 6.7 -0.019 -0.2 5.3 -0.055 -0.026 -6.4 -6.4 -0.064 -0.4 -2 -2.7 -2 -1.6 -3.6 0.2 0.9 -0.4 -3.1 -0.3
8 9 T. Hardaway | J. Richardson 230:38 -8.2 -0.7 7.3 -0.048 -0.8 8.8 -0.103 -0.059 -6 -5.8 -0.069 0.2 -2.7 -7.2 -2.7 -3.6 -8.3 -1.1 1 0.7 -5.3 0.1
9 10 L. Dončić | J. Johnson 229:11 -7.7 2.1 -1 0.028 -1.9 -1.8 -0.035 0.018 -10 -9.7 -0.11 -4.7 -9.1 -3 -9.1 -3.7 -7.8 -2.8 -0.9 0.8 -0.3 2.1
10 11 D. Finney-Smith | T. Hardaway 225:53 -1 3.8 10.2 -0.011 0 4.5 -0.04 -0.02 -8.6 -8.8 -0.077 0.9 -0.6 -5.2 -0.6 -2.2 -5.1 2.3 0.7 -0.9 -5.1 -0.1
11 12 W. Cauley-Stein | T. Hardaway 215:03 12.3 6 -0.9 0.071 1.8 -4.1 0.085 0.082 -1.4 -3.8 0.056 -1.9 -1.2 4.4 -1.2 1.6 3.4 3.9 -1.3 2.7 -0.4 0.1
12 13 T. Hardaway | J. Johnson 214:53 -2.7 0.3 -4.9 0.029 -0.1 -6.5 0.06 0.033 -3.1 -3.6 -0.017 -4.9 -9.3 -2 -9.3 -3.5 -7.8 -2 -0.2 1.2 1 2.1
13 14 J. Brunson | J. Johnson 190:02 -11.5 -1.6 -3.6 0.001 -4.7 -8.1 -0.052 -0.024 -3.7 -2.3 -0.081 -4.7 -9.6 -3.4 -9.6 -4 -8.7 -2.3 -1.9 0.5 0.5 1.8
14 15 T. Hardaway | K. Porziņģis 188:30 -12.7 -6.6 -3.2 -0.055 -1.1 4.8 -0.074 -0.059 1.7 -2.9 0.192 -3.2 -7.3 -5 -7.3 -4.5 -9 -0.6 -3.2 0.1 0.8 -1.2
15 16 L. Dončić | K. Porziņģis 181:14 -8.8 -2.5 -2.1 -0.017 -2.6 3.3 -0.1 -0.03 -1.1 -6.7 0.19 -2.5 -4.9 -1.7 -4.9 -2.6 -5.4 0.2 -4.1 1.5 1.8 0
16 17 T. Hardaway | D. Powell 178:57 -3.2 -0.7 2.1 -0.019 2 3.1 0.025 -0.009 -3.9 -3 -0.071 -2.4 -6.7 -6.1 -6.7 -4.3 -9.7 -0.7 1.2 0.3 -1.5 -0.1
17 18 T. Burke | T. Hardaway 177:36 -2.2 -2.4 -3.7 -0.008 2 2.8 0.027 0.006 0.5 -0.9 0.047 -3.3 -6 -1.8 -6 -3 -6.2 -6.2 2 1.3 0.7 0.1
18 19 J. Brunson | L. Dončić 165:52 -3.6 -0.8 -7.2 0.029 -4.4 -5.7 -0.077 0.008 2.5 3.1 0 -6.2 -11.6 -0.7 -11.6 -3.5 -7.8 0.2 -1.4 1.8 1.1 -1.6
19 20 L. Dončić | D. Powell 162:30 -5 0.3 2.3 -0.009 1 3 -0.002 -0.005 -6.6 -4.3 -0.119 -4.3 -11.1 -7.3 -11.1 -5.8 -13.2 0.7 2.3 0.7 -4.3 0.2
20 nan Team Average 965:54 -2.1 0.4 0.6 0.002 -0.7 0.8 -0.025 -0.002 -2.2 -2.3 -0.021 -2.1 -4.7 -2.3 -4.7 -2.2 -4.9 -0.4 -0.6 0.5 -1.8 -0.3
-- --- ------------------------------- ------ ----- ---- ---- ------ ---- ---- ------ ------ ----- ---- ------ ---- ----- ---- ----- ---- ----- ---- ---- ---- ---- ----
Sample output for a .csv file:

Related

How to merge or groupby multiple rows having same value in one of the columns

I need help on the below problem,
Problem:
I have below dataframe. In this dataframe, first row is a title, and first column is also a title column. I have three different rows of 5.0, 10.0, 20.0 in first column (Phi) and I have different values against different values.
df_combined
Phi 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0
5.0 -6.7 5.6 -2.7 -1.0 4.4 -6.4 6.3 -4.2
10.0 -3.8 3.1 -1.5 -0.5 2.5 -3.6 3.6 -2.4
20.0 6.3 -5.3 2.6 0.9 -4.2 6.1 -6.0 4.0
5.0 -1.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
10.0 -3.8 3.1 -1.5 -4.5 2.5 -1.6 2.6 -4.4
20.0 6.3 -1.3 2.6 0.9 -4.2 6.1 -7.0 4.0
5.0 -0.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
10.0 -3.8 3.1 -6.5 -2.5 6.5 -8.6 4.6 -3.4
20.0 6.3 -1.3 2.6 3.9 -3.2 4.1 -5.0 9.0
Expected output:
I want my dataframe lookimg like this where values against 5.0 come together. And same for 10.0 and 20.0. I do not want to aggregate or count or addition of these values. I just want these columns come together next to each other.
Phi 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0
-6.7 5.6 -2.7 -1.0 4.4 -6.4 6.3 -4.2
5.0 -1.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
-0.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
10.0 -3.8 3.1 -1.5 -4.5 2.5 -1.6 2.6 -4.4
-3.8 3.1 -6.5 -2.5 6.5 -8.6 4.6 -3.4
6.3 -5.3 2.6 0.9 -4.2 6.1 -6.0 4.0
20.0 6.3 -1.3 2.6 0.9 -4.2 6.1 -7.0 4.0
6.3 -1.3 2.6 3.9 -3.2 4.1 -5.0 9.0
I tried groupby function like below,
df_combined2 = df_combined.groupby(df_combined['Phi'])
But got below error,
<pandas.core.groupby.generic.DataFrameGroupBy object at 0x000001BE9EC2BDC0>
What should I do?
sort the values by PHI and then make the repeating values as empty
# sort the dataframe
df=df.sort_values('Phi')
#to make repetitive values under PHI as empty
df['Phi']=df['Phi'].mask(df['Phi'].eq(df['Phi'].shift(1)), "")
df
OR
# sort the dataframe
df=df.sort_values('Phi')
# makes PHI as empty when diff from previous value is 0
df['Phi']=df['Phi'].mask(df['Phi'].diff().eq(0), '')
df
Phi 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0
0 5.0 -6.7 5.6 -2.7 -1.0 4.4 -6.4 6.3 -4.2
3 -1.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
6 -0.7 5.6 -6.7 -7.0 1.4 -0.4 3.3 -4.2
1 10.0 -3.8 3.1 -1.5 -0.5 2.5 -3.6 3.6 -2.4
4 -3.8 3.1 -1.5 -4.5 2.5 -1.6 2.6 -4.4
7 -3.8 3.1 -6.5 -2.5 6.5 -8.6 4.6 -3.4
2 20.0 6.3 -5.3 2.6 0.9 -4.2 6.1 -6.0 4.0
5 6.3 -1.3 2.6 0.9 -4.2 6.1 -7.0 4.0
8 6.3 -1.3 2.6 3.9 -3.2 4.1 -5.0 9.0

Comparing one month's value of current year with previous year values adding or substracting multiple parameters

Given a following dataframe df:
date mom_pct
0 2020-1-31 1.4
1 2020-2-29 0.8
2 2020-3-31 -1.2
3 2020-4-30 -0.9
4 2020-5-31 -0.8
5 2020-6-30 -0.1
6 2020-7-31 0.6
7 2020-8-31 0.4
8 2020-9-30 0.2
9 2020-10-31 -0.3
10 2020-11-30 -0.6
11 2020-12-31 0.7
12 2021-1-31 1.0
13 2021-2-28 0.6
14 2021-3-31 -0.5
15 2021-4-30 -0.3
16 2021-5-31 -0.2
17 2021-6-30 -0.4
18 2021-7-31 0.3
19 2021-8-31 0.1
20 2021-9-30 0.0
21 2021-10-31 0.7
22 2021-11-30 0.4
23 2021-12-31 -0.3
24 2022-1-31 0.4
25 2022-2-28 0.6
26 2022-3-31 0.0
27 2022-4-30 0.4
28 2022-5-31 -0.2
I want to compare the chain ratio value of a month of the current year to the value of the month of the previous year. Assume that the value of the same period last year is y_t-1, and the current value of this year is y_t. I will create a new column according to the following rules:
If y_t = y_t-1, returns 0 for new column;
If y_t ∈ (y_t-1, y_t-1 + 0.3], returns 1;
If y_t ∈ (y_t-1 + 0.3, y_t-1 + 0.5], returns 2;
If y_t > (y_t-1 + 0.5), returns 3;
If y_t ∈ [y_t-1 - 0.3, y_t-1), returns -1;
If y_t ∈ [y_t-1 - 0.5, y_t-1 - 0.3), returns -2;
If y_t < (y_t-1 - 0.5), returns -3
The expected result:
date mom_pct categorial_mom_pct
0 2020-1-31 1.0 NaN
1 2020-2-29 0.8 NaN
2 2020-3-31 -1.2 NaN
3 2020-4-30 -0.9 NaN
4 2020-5-31 -0.8 NaN
5 2020-6-30 -0.1 NaN
6 2020-7-31 0.6 NaN
7 2020-8-31 0.4 NaN
8 2020-9-30 0.2 NaN
9 2020-10-31 -0.3 NaN
10 2020-11-30 -0.6 NaN
11 2020-12-31 0.7 NaN
12 2021-1-31 1.0 0.0
13 2021-2-28 0.6 -1.0
14 2021-3-31 -0.5 3.0
15 2021-4-30 -0.3 3.0
16 2021-5-31 -0.2 3.0
17 2021-6-30 -0.4 -1.0
18 2021-7-31 0.3 -1.0
19 2021-8-31 0.1 -1.0
20 2021-9-30 0.0 -1.0
21 2021-10-31 0.7 3.0
22 2021-11-30 0.4 3.0
23 2021-12-31 -0.3 -3.0
24 2022-1-31 0.4 -3.0
25 2022-2-28 0.6 0.0
26 2022-3-31 0.0 2.0
27 2022-4-30 0.4 3.0
28 2022-5-31 -0.2 0.0
I attempt to create multiple columns and ranges, then check mom_pct is in which range. Is it possible to do that in a more effecient way? Thanks.
df1['mom_pct_zero'] = df1['mom_pct'].shift(12)
df1['mom_pct_pos1'] = df1['mom_pct'].shift(12) + 0.3
df1['mom_pct_pos2'] = df1['mom_pct'].shift(12) + 0.5
df1['mom_pct_neg1'] = df1['mom_pct'].shift(12) - 0.3
df1['mom_pct_neg2'] = df1['mom_pct'].shift(12) - 0.5
I would do it as follows
def categorize(v):
if np.isnan(v) or v == 0.:
return v
sign = -1 if v < 0 else 1
eps = 1e-10
if abs(v) <= 0.3 + eps:
return sign * 1
if abs(v) <= 0.5 + eps:
return sign * 2
return sign * 3
df['categorial_mom_pct'] = df['mom_pct'].diff(12).map(categorize)
print(df)
Note that I added a very small eps to the threshold to counter the precision issue with floating point arithmetic
abs(-0.3) <= 0.3 # True
abs(-0.4 + 0.1) <= 0.3 # False
abs(-0.4 + 0.1) <= 0.3 + 1e-10 # True
Out:
date mom_pct categorial_mom_pct
0 2020-1-31 1.0 NaN
1 2020-2-29 0.8 NaN
2 2020-3-31 -1.2 NaN
3 2020-4-30 -0.9 NaN
4 2020-5-31 -0.8 NaN
5 2020-6-30 -0.1 NaN
6 2020-7-31 0.6 NaN
7 2020-8-31 0.4 NaN
8 2020-9-30 0.2 NaN
9 2020-10-31 -0.3 NaN
10 2020-11-30 -0.6 NaN
11 2020-12-31 0.7 NaN
12 2021-1-31 1.0 0.0
13 2021-2-28 0.6 -1.0
14 2021-3-31 -0.5 3.0
15 2021-4-30 -0.3 3.0
16 2021-5-31 -0.2 3.0
17 2021-6-30 -0.4 -1.0
18 2021-7-31 0.3 -1.0
19 2021-8-31 0.1 -1.0
20 2021-9-30 0.0 -1.0
21 2021-10-31 0.7 3.0
22 2021-11-30 0.4 3.0
23 2021-12-31 -0.3 -3.0
24 2022-1-31 0.4 -3.0
25 2022-2-28 0.6 0.0
26 2022-3-31 0.0 2.0
27 2022-4-30 0.4 3.0
28 2022-5-31 -0.2 0.0

Issue with datetime formatting

I am having an issue with the datetime format of a set of data. The issue is due to the hour of day ranging from 1-24, with the 24th hour set to the wrong day (more specifically, the previous day). I have a sample of the data below,
1/1/2019,14:00,0.2,0.1,0.0,0.2,3.0,36.7,3,153
1/1/2019,15:00,0.2,0.6,0.2,0.4,3.9,36.7,1,199
1/1/2019,16:00,1.8,2.4,0.8,1.6,1.1,33.0,0,307
1/1/2019,17:00,3.0,3.2,0.6,2.6,6.0,32.8,1,310
1/1/2019,18:00,1.6,2.2,0.5,1.7,7.9,33.1,4,293
1/1/2019,19:00,1.7,1.1,0.6,0.6,5.9,35.0,5,262
1/1/2019,20:00,1.0,0.5,0.2,0.2,2.9,32.6,5,201
1/1/2019,21:00,0.6,0.3,0.0,0.4,2.1,31.8,6,182
1/1/2019,22:00,0.4,0.3,0.0,0.4,5.1,31.4,6,187
1/1/2019,23:00,0.8,0.6,0.3,0.3,9.9,30.2,5,227
1/1/2019,24:00,1.0,0.7,0.3,0.4,6.9,27.9,4,225 --- Here the date should be 1/2/2019
1/2/2019,01:00,1.3,0.9,0.5,0.4,4.0,26.9,6,236
1/2/2019,02:00,0.4,0.4,0.2,0.2,5.0,27.3,6,168
1/2/2019,03:00,0.7,0.5,0.3,0.3,6.9,30.2,4,219
1/2/2019,04:00,1.3,0.8,0.5,0.3,5.9,32.3,4,242
1/2/2019,05:00,0.7,0.2,0.0,0.2,3.0,33.8,4,177
1/2/2019,06:00,0.5,0.2,0.2,0.1,5.1,36.1,4,195
1/2/2019,07:00,0.6,0.3,0.2,0.2,9.9,38.0,4,200
1/2/2019,08:00,0.5,0.6,0.4,0.3,6.8,38.9,4,179
1/2/2019,09:00,0.5,0.2,0.0,0.2,3.0,39.0,4,193
1/2/2019,10:00,0.3,0.3,0.2,0.1,4.0,38.7,5,198
1/2/2019,11:00,0.3,0.3,0.2,0.0,4.9,38.4,5,170
1/2/2019,12:00,0.6,0.3,0.3,0.0,2.0,38.4,4,172
1/2/2019,13:00,0.2,0.3,0.2,0.0,2.0,38.8,4,154
1/2/2019,14:00,0.3,0.1,0.0,0.2,1.9,39.3,4,145
This is a fairly large set of data which I need to make a time series plot of, and as such I need to find a way to fix this formatting issue. I was attempting to iterate through the rows and in a pandas dataframe to fix problematic rows, but this does not provide any results. Thank you for any help beforehand.
You can convert date to datetimes by to_datetime and then add time column converted to timedeltas by to_timedelta:
df['date'] = pd.to_datetime(df['date']) + pd.to_timedelta(df['time'] + ':00')
Or if need remove time column also:
print (df)
date time a b c d e f g h
0 1/1/2019 14:00 0.2 0.1 0.0 0.2 3.0 36.7 3 153
1 1/1/2019 15:00 0.2 0.6 0.2 0.4 3.9 36.7 1 199
2 1/1/2019 16:00 1.8 2.4 0.8 1.6 1.1 33.0 0 307
3 1/1/2019 17:00 3.0 3.2 0.6 2.6 6.0 32.8 1 310
4 1/1/2019 18:00 1.6 2.2 0.5 1.7 7.9 33.1 4 293
5 1/1/2019 19:00 1.7 1.1 0.6 0.6 5.9 35.0 5 262
6 1/1/2019 20:00 1.0 0.5 0.2 0.2 2.9 32.6 5 201
7 1/1/2019 21:00 0.6 0.3 0.0 0.4 2.1 31.8 6 182
8 1/1/2019 22:00 0.4 0.3 0.0 0.4 5.1 31.4 6 187
9 1/1/2019 23:00 0.8 0.6 0.3 0.3 9.9 30.2 5 227
10 1/1/2019 24:00 1.0 0.7 0.3 0.4 6.9 27.9 4 225
11 1/2/2019 01:00 1.3 0.9 0.5 0.4 4.0 26.9 6 236
12 1/2/2019 02:00 0.4 0.4 0.2 0.2 5.0 27.3 6 168
13 1/2/2019 03:00 0.7 0.5 0.3 0.3 6.9 30.2 4 219
14 1/2/2019 04:00 1.3 0.8 0.5 0.3 5.9 32.3 4 242
15 1/2/2019 05:00 0.7 0.2 0.0 0.2 3.0 33.8 4 177
16 1/2/2019 06:00 0.5 0.2 0.2 0.1 5.1 36.1 4 195
17 1/2/2019 07:00 0.6 0.3 0.2 0.2 9.9 38.0 4 200
18 1/2/2019 08:00 0.5 0.6 0.4 0.3 6.8 38.9 4 179
19 1/2/2019 09:00 0.5 0.2 0.0 0.2 3.0 39.0 4 193
20 1/2/2019 10:00 0.3 0.3 0.2 0.1 4.0 38.7 5 198
21 1/2/2019 11:00 0.3 0.3 0.2 0.0 4.9 38.4 5 170
22 1/2/2019 12:00 0.6 0.3 0.3 0.0 2.0 38.4 4 172
23 1/2/2019 13:00 0.2 0.3 0.2 0.0 2.0 38.8 4 154
24 1/2/2019 14:00 0.3 0.1 0.0 0.2 1.9 39.3 4 145
df['date'] = pd.to_datetime(df['date']) + pd.to_timedelta(df.pop('time') + ':00')
print (df)
date a b c d e f g h
0 2019-01-01 14:00:00 0.2 0.1 0.0 0.2 3.0 36.7 3 153
1 2019-01-01 15:00:00 0.2 0.6 0.2 0.4 3.9 36.7 1 199
2 2019-01-01 16:00:00 1.8 2.4 0.8 1.6 1.1 33.0 0 307
3 2019-01-01 17:00:00 3.0 3.2 0.6 2.6 6.0 32.8 1 310
4 2019-01-01 18:00:00 1.6 2.2 0.5 1.7 7.9 33.1 4 293
5 2019-01-01 19:00:00 1.7 1.1 0.6 0.6 5.9 35.0 5 262
6 2019-01-01 20:00:00 1.0 0.5 0.2 0.2 2.9 32.6 5 201
7 2019-01-01 21:00:00 0.6 0.3 0.0 0.4 2.1 31.8 6 182
8 2019-01-01 22:00:00 0.4 0.3 0.0 0.4 5.1 31.4 6 187
9 2019-01-01 23:00:00 0.8 0.6 0.3 0.3 9.9 30.2 5 227
10 2019-01-02 00:00:00 1.0 0.7 0.3 0.4 6.9 27.9 4 225
11 2019-01-02 01:00:00 1.3 0.9 0.5 0.4 4.0 26.9 6 236
12 2019-01-02 02:00:00 0.4 0.4 0.2 0.2 5.0 27.3 6 168
13 2019-01-02 03:00:00 0.7 0.5 0.3 0.3 6.9 30.2 4 219
14 2019-01-02 04:00:00 1.3 0.8 0.5 0.3 5.9 32.3 4 242
15 2019-01-02 05:00:00 0.7 0.2 0.0 0.2 3.0 33.8 4 177
16 2019-01-02 06:00:00 0.5 0.2 0.2 0.1 5.1 36.1 4 195
17 2019-01-02 07:00:00 0.6 0.3 0.2 0.2 9.9 38.0 4 200
18 2019-01-02 08:00:00 0.5 0.6 0.4 0.3 6.8 38.9 4 179
19 2019-01-02 09:00:00 0.5 0.2 0.0 0.2 3.0 39.0 4 193
20 2019-01-02 10:00:00 0.3 0.3 0.2 0.1 4.0 38.7 5 198
21 2019-01-02 11:00:00 0.3 0.3 0.2 0.0 4.9 38.4 5 170
22 2019-01-02 12:00:00 0.6 0.3 0.3 0.0 2.0 38.4 4 172
23 2019-01-02 13:00:00 0.2 0.3 0.2 0.0 2.0 38.8 4 154
24 2019-01-02 14:00:00 0.3 0.1 0.0 0.2 1.9 39.3 4 145

Why does my SVG logo look different on different computers?

I tried to create a logo in .svg format with Inkscape.
The problem is, it looks different on different computers.
The upper image shows how it looks on the computer of a friend:
It seems to be a different font and/or wrong distances.
The lower image shows how it looks on my computer. Thats what i want it to look.
How can i make it look the same on every computer (any OS, browser, monitor, ...) or is this not possible with svg format so i have to switch to jpg or png?
Here is the svg as text code:
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="100%" height="100%" viewBox="0 0 224 44" id="svg2" inkscape:version="0.48.4 r9939">
<metadata id="metadata104">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs4">
<pattern patternTransform="scale(2.2,1.6)" id="p1" xlink:href="#Packedcircles"/>
<pattern patternUnits="userSpaceOnUse" width="1" height="1.7" patternTransform="translate(0,0) scale(10,10)" id="Packedcircles">
<circle style="fill:black;stroke:none" cx="0" cy="0.5" r="0.5" id="circle4759"/>
<circle style="fill:black;stroke:none" cx="1" cy="0.5" r="0.5" id="circle4761"/>
<circle style="fill:black;stroke:none" cx="0.5" cy="1.4" r="0.5" id="circle4763"/>
<circle style="fill:black;stroke:none" cx="0.5" cy="-0.4" r="0.5" id="circle4765"/>
</pattern>
<radialGradient cx="18.2" cy="15.7" r="30" id="r1" gradientUnits="userSpaceOnUse" gradientTransform="translate(76.812563,-3.0672977)">
<stop id="stop3131" style="stop-color:#e5e5e5;stop-opacity:1" offset="0"/>
<stop id="stop3133" style="stop-color:#e5e5e5;stop-opacity:1" offset="0.15516999"/>
<stop id="stop3135" style="stop-color:#6b6b6b;stop-opacity:1" offset="0.75"/>
<stop id="stop3137" style="stop-color:#474747;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="15.6" cy="12.1" r="43.5" id="r2" gradientUnits="userSpaceOnUse" gradientTransform="translate(76.812563,-3.0672977)">
<stop id="stop3140" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3142" style="stop-color:#ffffff;stop-opacity:0.16495" offset="1"/>
</radialGradient>
<radialGradient cx="11.8" cy="10.5" r="32.7" id="r3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.98602467,0,0,0.84779,86.699433,-3.0672977)">
<stop id="stop3150" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3152" style="stop-color:#ffffff;stop-opacity:0" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r4" gradientUnits="userSpaceOnUse">
<stop id="stop3176" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3178" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3180" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r5" gradientUnits="userSpaceOnUse">
<stop id="stop3197" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3199" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3201" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r6" gradientUnits="userSpaceOnUse">
<stop id="stop3218" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3220" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3222" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r7" gradientUnits="userSpaceOnUse">
<stop id="stop3239" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3241" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3243" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r8" gradientUnits="userSpaceOnUse">
<stop id="stop3260" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3262" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3264" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r9" gradientUnits="userSpaceOnUse">
<stop id="stop3281" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3283" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3285" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r10" gradientUnits="userSpaceOnUse">
<stop id="stop3302" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3304" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3306" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
<radialGradient cx="19.3" cy="16.9" r="42.2" fx="19.6315" fy="17.1777" id="r11" gradientUnits="userSpaceOnUse">
<stop id="stop3323" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
<stop id="stop3325" style="stop-color:#fefefe;stop-opacity:1" offset="0.37931001"/>
<stop id="stop3327" style="stop-color:#1d1d1d;stop-opacity:1" offset="1"/>
</radialGradient>
</defs>
<path d="m 120.8 20.4 c 0 10.7 -8.7 19.4 -19.4 19.4 -10.7 0 -19.4 -8.7 -19.4 -19.4 0 -10.7 8.7 -19.4 19.4 -19.4 10.7 0 19.4 8.7 19.4 19.4 z" id="path39" style="fill:url(#r1);stroke:#3f3f3f"/>
<path d="m 112.4 12.2 a 10.8 9.3 0 0 1 -21.6 0 10.8 9.3 0 1 1 21.6 0 z" id="path41" style="opacity:0.42158999;fill:url(#r3)"/>
<g transform="matrix(0.98237,0,0,0.98237,76.933643,-2.8343877)" id="g43" style="fill-opacity:0.71344999">
<path d="m 44.1 20.7 0 0 -0.5 0.6 c -0.3 -0.4 -0.7 -0.7 -1.1 -1.1 l -0.8 0.1 -0.8 -0.9 v 1.1 l 0.7 0.5 0.4 0.5 0.6 -0.7 c 0.1 0.3 0.3 0.5 0.4 0.8 v 0.8 l -0.7 0.7 -1.2 0.8 -0.9 0.9 -0.6 -0.7 0.3 -0.7 -0.6 -0.7 -1 -2.1 -0.8 -0.9 -0.2 0.2 0.3 1.2 0.6 0.7 c 0.4 1 0.7 2 1.2 3 0.7 0 1.4 -0.1 2.1 -0.2 v 0.6 l -0.9 2.1 -0.8 0.9 -0.7 1.4 v 2.3 l 0.2 0.9 -0.4 0.4 -0.8 0.5 -0.8 0.7 0.7 0.8 -0.9 0.8 0.2 0.5 -1.4 1.6 h -0.9 l -0.8 0.5 H 33.6 V 38.3 L 33.4 37 c -0.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 c 0 0 -0 -0 0 0.2 0.1 0.2 2.3 1.5 2.5 1.3 l 0.3 -0.2 -0.1 -0.4 0.6 -0.6 0.2 -0.6 0.9 -0.3 0.7 -1.8 -0.2 -0.5 0.5 -0.7 1.1 -0.2 0.6 -1.3 -0.1 -1.6 0.9 -1.2 0.1 -1.2 C 20.7 29.5 19.5 28.9 18.4 28.2" id="path55"/>
<path d="m 16.8 9.6 0.7 0.5 h 0.6 V 9.5 l -0.7 -0.3 -0.6 0.4" id="path57"/>
<path d="M 14.9 8.9 14.5 9.8 h 0.7 L 15.6 9 16.5 8.3 17.3 8.6 18.7 9.6 19.5 8.9 18.7 8.6 18.3 7.8 16.9 7.7 16.8 7.3 16.2 7.4 15.9 8 15.5 7.3 l -0.1 0.3 0.1 0.8 -0.6 0.5" id="path59"/>
<path d="M 17.5 6.8 17.9 6.5 18.6 6.4 c 0.5 -0.2 1 -0.4 1.5 -0.6 l -0.3 -0.5 -0.9 0.1 -0.4 0.4 -0.7 0.1 -0.6 0.3 -0.3 0.2 -0.2 0.3 0.9 0.2" id="path61"/>
<path d="m 18.7 14.7 0.4 -0.7 -0.7 -0.5 0.2 1.2" id="path63"/>
</g>
<g transform="matrix(0.98237,0,0,0.98237,76.731613,-3.0364147)" id="g65" style="fill:url(#radialGradient4756-227)">
<g id="g67" style="fill:url(#radialGradient4756-112)">
<g id="g69" style="fill:url(#radialGradient4756-309)">
<path d="m 44.1 20.7 0 0 -0.5 0.6 c -0.3 -0.4 -0.7 -0.7 -1.1 -1.1 l -0.8 0.1 -0.8 -0.9 v 1.1 l 0.7 0.5 0.4 0.5 0.6 -0.7 c 0.1 0.3 0.3 0.5 0.4 0.8 v 0.8 l -0.7 0.7 -1.2 0.8 -0.9 0.9 -0.6 -0.7 0.3 -0.7 -0.6 -0.7 -1 -2.1 -0.8 -0.9 -0.2 0.2 0.3 1.2 0.6 0.7 c 0.4 1 0.7 2 1.2 3 0.7 0 1.4 -0.1 2.1 -0.2 v 0.6 l -0.9 2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2.8 2.5 4.4 5.2 1.6 2.7 2.3 6 2.3 6.6 z" id="path71" style="fill:url(#r4)"/>
</g>
</g>
<g id="g73" style="fill:url(#radialGradient4756-612)">
<g id="g75" style="fill:url(#radialGradient4756-567)">
<path d="m 26.1 9.2 -0.1 0.5 0.5 0.3 0.9 -0.6 -0.4 -0.5 -0.6 0.3 -0.3 -0.1" id="path77" style="fill:url(#r5)"/>
</g>
</g>
<g id="g79" style="fill:url(#radialGradient4756-773)">
<g id="g81" style="fill:url(#radialGradient4756-84)">
<path d="m 26.9 5.9 -1.9 -0.7 -2.2 0.2 -2.7 0.7 -0.5 0.5 1.7 1.2 v 0.7 l -0.7 0.7 0.9 1.7 0.6 -0.3 0.7 -1.2 c 1.1 -0.3 2.1 -0.7 3.2 -1.2 l 0.9 -2.2" id="path83" style="fill:url(#r6)"/>
</g>
</g>
<g id="g85" style="fill:url(#radialGradient4756-502)">
<g id="g87" style="fill:url(#radialGradient4756-965)">
<path d="m 28.8 12.8 -0.3 -0.7 -0.5 0.2 0.1 0.9 0.7 -0.3" id="path89" style="fill:url(#r7)"/>
</g>
</g>
<g id="g91" style="fill:url(#radialGradient4756-785)">
<g id="g93" style="fill:url(#radialGradient4756-135)">
<path d="m 29.1 12.6 -0.1 1 0.8 -0.2 0.6 -0.6 -0.5 -0.5 C 29.7 11.9 29.5 11.5 29.3 11 H 28.8 v 0.5 l 0.3 0.3 v 0.7" id="path95" style="fill:url(#r8)"/>
</g>
</g>
<g id="g97" style="fill:url(#radialGradient4756-862)">
<g id="g99" style="fill:url(#radialGradient4756-812)">
<path d="m 18.4 28.2 -0.6 -1.2 -1.1 -0.2 -0.6 -1.6 -1.5 0.2 -1.2 -0.9 -1.3 1.2 v 0.2 c -0.4 -0.1 -0.9 -0.1 -1.2 -0.3 l -0.3 -0.8 v -0.9 l -0.9 0.1 0.2 -1.7 H 9.4 L 8.9 22.8 8.4 23.1 7.7 22.6 7.6 21.7 7.8 20.8 8.8 19.9 h 0.9 l 0.1 -0.5 1.1 0.2 0.8 1 0.1 -1.6 1.4 -1.2 0.5 -1.2 1 -0.4 0.6 -0.8 1.3 -0.2 0.7 -1 h -2 l 1.2 -0.6 h 0.9 l 1.2 -0.4 0.1 -0.5 -0.4 -0.4 -0.5 -0.2 0.1 -0.5 -0.4 -0.7 -0.9 0.3 0.1 -0.7 -1 -0.6 -0.8 1.4 0.1 0.5 -0.8 0.3 -0.5 1.1 -0.2 -1 -1.4 -0.6 -0.2 -0.7 1.8 -1.1 0.8 -0.7 0.1 -0.9 -0.4 -0.2 -0.6 -0.1 -0.4 0.9 c 0 0 -0.6 0.1 -0.8 0.2 -2 1.8 -6 5.8 -7 13.3 0 0.2 0.7 1.2 0.7 1.2 l 1.5 0.9 1.5 0.4 0.7 0.8 1 0.7 0.6 -0.1 0.4 0.2 v 0.1 l -0.6 1.6 -0.4 0.7 0.1 0.3 -0.4 1.2 1.3 2.4 1.3 1.2 0.6 0.8 -0.1 1.7 0.4 1 -0.4 1.9 c 0 0 -0 -0 0 0.2 0.1 0.2 2.3 1.5 2.5 1.3 l 0.3 -0.2 -0.1 -0.4 0.6 -0.6 0.2 -0.6 0.9 -0.3 0.7 -1.8 -0.2 -0.5 0.5 -0.7 1.1 -0.2 0.6 -1.3 -0.1 -1.6 0.9 -1.2 0.1 -1.2 C 20.7 29.5 19.5 28.9 18.4 28.2" id="path101" style="fill:url(#r9)"/>
</g>
</g>
<g id="g103" style="fill:url(#radialGradient4756-35)">
<g id="g105" style="fill:url(#radialGradient4756-479)">
<path d="m 16.8 9.6 0.7 0.5 h 0.6 V 9.5 l -0.7 -0.3 -0.6 0.4" id="path107" style="fill:url(#r10)"/>
</g>
</g>
<g id="g109" style="fill:url(#radialGradient4756-607)">
<g id="g111" style="fill:url(#radialGradient4756-611)">
<path d="M 14.9 8.9 14.5 9.8 h 0.7 L 15.6 9 16.5 8.3 17.3 8.6 18.7 9.6 19.5 8.9 18.7 8.6 18.3 7.8 16.9 7.7 16.8 7.3 16.2 7.4 15.9 8 15.5 7.3 l -0.1 0.3 0.1 0.8 -0.6 0.5" id="path113" style="fill:url(#r11)"/>
</g>
</g>
<g id="g115" style="fill:url(#radialGradient4756-880)">
<g id="g117" style="fill:url(#radialGradient4756-979)">
<path d="M 17.5 6.8 17.9 6.5 18.6 6.4 c 0.5 -0.2 1 -0.4 1.5 -0.6 l -0.3 -0.5 -0.9 0.1 -0.4 0.4 -0.7 0.1 -0.6 0.3 -0.3 0.2 -0.2 0.3 0.9 0.2" id="path119" style="fill:url(#radialGradient4756-244)"/>
</g>
</g>
<g id="g121" style="fill:url(#radialGradient4756-361)">
<g id="g123" style="fill:url(#radialGradient4756-234)">
<path d="m 18.7 14.7 0.4 -0.7 -0.7 -0.5 0.2 1.2" id="path125" style="fill:url(#radialGradient4756-167)"/>
</g>
</g>
</g>
<path d="m 119.8 20.4 c 0 10.2 -8.2 18.4 -18.4 18.4 -10.2 0 -18.4 -8.2 -18.4 -18.4 0 -10.2 8.2 -18.4 18.4 -18.4 10.2 0 18.4 8.2 18.4 18.4 z" id="path127" style="fill:none;stroke:url(#r2)"/>
<text x="0" y="32.6" id="text3950" style="font-size:30px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:url(#p1);fill-opacity:1;stroke:#ffffff;stroke-width:0.3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif Bold Italic">
<tspan x="0" y="32.6" id="tspan3952" style="font-size:30px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#p1);fill-opacity:1;stroke:#ffffff;stroke-width:0.3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif Bold Italic">Zedo</tspan>
</text>
<text x="129.7" y="32.7" id="text3954" style="font-size:30px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:url(#p1);fill-opacity:1;stroke:#ffffff;stroke-width:0.3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif Bold Italic">
<tspan x="129.7" y="32.7" id="tspan3956" style="font-size:30px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#p1);fill-opacity:1;stroke:#ffffff;stroke-width:0.3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Droid Serif;-inkscape-font-specification:Droid Serif Bold Italic">Media</tspan>
</text>
</svg>
Droid Serif is available from Google Fonts, so there's nothing to stop you embedding it from there.
This works in Chrome and Firefox:
#import url(http://fonts.googleapis.com/css?family=Droid+Serif:700italic);
.droid { font-family: 'Droid Serif', serif; }
<svg width="600" height="150" viewBox="0 0 600 150">
<defs>
<pattern patternUnits="userSpaceOnUse"
width="1"
height="1.7"
patternTransform="scale(10,10)"
id="Packedcircles">
<circle fill="#000" cx="0" cy="0.5" r="0.5"/>
<circle fill="#000" cx="1" cy="0.5" r="0.5"/>
<circle fill="#000" cx="0.5" cy="1.4" r="0.5"/>
<circle fill="#000" cx="0.5" cy="-0.4" r="0.5"/>
</pattern>
</defs>
<text style="font-size:100px; font-style:italic;
font-weight:bold; fill:url(#Packedcircles);"
x="20"
y="120"
class="droid">Droid Serif Bold Italic">Zedo</text>
</svg>
Note: If you need further help, don't post a massive wall of code here; provide a minimal, complete, and verifiable example instead.

How does Excel's FREQUENCY function work?

With the following function:
=FREQUENCY(C2:C724,D2:D37)
The second parameter is the BIN
What I don't understand is why Excel would increment the BIN for the rest of your values. The BIN does not change! It stays the same bin. Yet when I paste the formula for all my values it does this:
=FREQUENCY(C2:C724,D2:D37)
=FREQUENCY(C2:C724,D3:D38)
=FREQUENCY(C2:C724,D4:D39)
The last column is what was generated (and this is correct but it does not make sense!!)
Etoh bin
15.9 20 0
14.6 19 0
14.1 18 0
13.9 17 0
13.3 16 0
13.3 15 0
13.2 14 1
12.6 13 2
12.1 12 3
11.8 11 6
11.5 10 4
11.2 9 4
11 8 8
10.5 7 10
10.3 6 26
10.3 5 27
10.2 4 40
10.1 3 89
9.8 2 151
9.7 1 205
9.5 0 102
9.1 -1 17
8.9 -2 7
8.3 -3 3
8.1 -4 2
8.1 -5 0
7.9 -6 3
7.6 -7 2
7.5 -8 2
7.5 -9 1
7.5 -10 1
7.4 -11 0
7.2 -12 0
7.1 -13 1
7.0 -14 0
7.0 -15 0
6.8
6.7
6.6
6.5
6.4
6.2
6.2
6.1
6.0
5.9
5.8
5.8
5.7
5.7
5.7
5.5
5.5
5.5
5.4
5.3
5.3
5.3
5.3
5.3
5.3
5.3
5.2
5.2
5.2
5.1
5.1
5.1
5.1
5.1
5.0
5.0
5.0
5.0
5.0
4.9
4.9
4.8
4.8
4.8
4.7
4.7
4.6
4.6
4.6
4.5
4.5
4.5
4.5
4.4
4.3
4.1
4.1
4.1
4.1
4.1
4.1
4.0
4.0
4.0
4.0
4.0
3.9
3.9
3.9
3.9
3.9
3.8
3.8
3.7
3.6
3.6
3.6
3.6
3.6
3.5
3.5
3.4
3.4
3.4
3.4
3.3
3.3
3.3
3.3
3.2
3.2
3.2
3.2
3.2
3.2
3.1
3.1
3.1
3.1
3.1
3.1
3.0
3.0
3.0
3.0
3.0
3.0
3.0
3.0
3.0
3.0
3.0
2.9
2.9
2.9
2.8
2.8
2.8
2.8
2.8
2.8
2.8
2.8
2.7
2.7
2.7
2.7
2.7
2.7
2.7
2.7
2.6
2.6
2.6
2.6
2.6
2.6
2.6
2.6
2.6
2.5
2.5
2.5
2.5
2.5
2.4
2.4
2.4
2.4
2.4
2.4
2.4
2.4
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.3
2.2
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-1.2
-1.2
-1.2
-1.3
-1.3
-1.7
-1.8
-1.9
-1.9
-2.1
-2.2
-2.4
-2.4
-2.5
-2.5
-2.6
-3.0
-3.2
-3.7
-4.6
-4.6
-6.1
-6.3
-6.3
-7.0
-7.8
-8.1
-8.5
-9.0
-10.2
-13.2
If I do as both of you suggested with the $, I am getting the WRONG results:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
It's a bit of keyboarding to make it easier, not mouse work, but do exactly this:
In cell E2, enter
=FREQUENCY(C2:C724,D2:D37). Hit
Enter.
You should now be on cell E3.
Press on the up arrow once on your
keyboard to return to E2 (and it will be 0).
Hold
down the Shift key and press on the down arrow until you've
reached cell E37. E2 through E37 will be highlighted.
Don't do anything else other than
hit the F2 key on your
keyboard now.
Now press and hold down
Ctrl + Shift.
Then, with those two held down, hit
Enter.
Voila! In every cell between E2
and E37 you should see this
{=FREQUENCY(C2:C724,D2:D37)} in the formula bar
(notice the {} brackets) and
the formula works. This is what makes an array formula.
It looks like what you've done is tried to copy and paste the function from the first cell to each of the subsequent cells.
Because it's an array function, what you need to do is:
Copy the text of the first cell (from the formula bar)
Select all the cells you are wanting the results to appear in
Paste the text you just copied into the formula bar
Press ctrl-shift-enter
This will put the same array function into all the cells
Unsure what you mean but it sounds like you need to use absolute addressing, prefix the column with $
You need to use absolute reference for the second argument only =FREQUENCY(C2:C$724,D2:D37)

Resources