(21193, 20)
0
1
39.47680312
1
1
39.47680312
2
1
39.47680312
3
1
39.47680312
4
1
39.47680312
5
1
39.47680312
6
1
39.47680312
7
1
39.47680312
count
21193
21193
mean
1
39.47680312
std
0
0
min
1
39.47680312
25%
1
39.47680312
50%
1
39.47680312
75%
1
39.47680312
max
1
39.47680312
(21193, 14)
0
1
39.47680312
1
1
39.47680312
2
1
39.47680312
3
1
39.47680312
4
1
39.47680312
<ipython-input-28-6e7d7bd9fdd8>:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_bicis_bruto["bikes3h"][df_bicis_bruto["bikes3h"].isnull() == True] = df_bicis_bruto["bikes"].mean()
<ipython-input-28-6e7d7bd9fdd8>:2: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_bicis_bruto["bikes"][df_bicis_bruto["bikes"].isnull() == True] = df_bicis_bruto["bikes"].mean()
(21193, 11)
0
20
1338501600
1
20
1338505200
2
20
1338508800
3
20
1338512400
4
20
1338516000
5
20
1338519600
6
20
1338523200
7
20
1338526800
8
20
1338530400
9
20
1338534000
(21193, 10)
0
1338501600
2012
1
1338505200
2012
2
1338508800
2012
3
1338512400
2012
4
1338516000
2012
5
1338519600
2012
6
1338523200
2012
7
1338526800
2012
8
1338530400
2012
9
1338534000
2012
(21193, 9)
0
2012
6
1
2012
6
2
2012
6
3
2012
6
4
2012
6
5
2012
6
6
2012
6
7
2012
6
8
2012
6
9
2012
6
(21193, 8)
0
2012
6
1
2012
6
2
2012
6
3
2012
6
4
2012
6
5
2012
6
6
2012
6
7
2012
6
8
2012
6
9
2012
6
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 21193 entries, 0 to 21192
Data columns (total 8 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 year 21193 non-null int64
1 month 21193 non-null int64
2 day 21193 non-null int64
3 hour 21193 non-null int64
4 weekday 21193 non-null object
5 isHoliday 21193 non-null int64
6 bikes 21193 non-null float64
7 bikes3h 21193 non-null float64
dtypes: float64(2), int64(5), object(1)
memory usage: 1.3+ MB
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 21193 entries, 0 to 21192
Data columns (total 8 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 year 21193 non-null int32
1 month 21193 non-null int32
2 day 21193 non-null int32
3 hour 21193 non-null int32
4 weekday 21193 non-null object
5 isHoliday 21193 non-null int32
6 bikes 21193 non-null int32
7 bikes3h 21193 non-null int32
dtypes: int32(7), object(1)
memory usage: 745.2+ KB
0
2012
6
1
2012
6
2
2012
6
3
2012
6
4
2012
6
5
2012
6
6
2012
6
7
2012
6
8
2012
6
9
2012
6
(21193, 6)
0
2012
6
1
2012
6
2
2012
6
3
2012
6
4
2012
6
0
2012
6
1
2012
6
2
2012
6
3
2012
6
4
2012
6
5
2012
6
6
2012
6
7
2012
6
8
2012
6
9
2012
6
(14835, 6)
(6358, 6)
15420
2014
3
7118
2013
3
21059
2014
10
8269
2013
5
15178
2014
2
11586
2013
9
9990
2013
7
7378
2013
4
4670
2012
12
16345
2014
4
15420
2014
3
7118
2013
3
21059
2014
10
8269
2013
5
15178
2014
2
11586
2013
9
9990
2013
7
7378
2013
4
4670
2012
12
16345
2014
4
Requirement already satisfied: tensorflow in /root/venv/lib/python3.9/site-packages (2.8.0)
Requirement already satisfied: typing-extensions>=3.6.6 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from tensorflow) (4.0.1)
Requirement already satisfied: wrapt>=1.11.0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (1.13.3)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from tensorflow) (1.42.0)
Requirement already satisfied: tensorboard<2.9,>=2.8 in /root/venv/lib/python3.9/site-packages (from tensorflow) (2.8.0)
Requirement already satisfied: keras<2.9,>=2.8.0rc0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (2.8.0)
Requirement already satisfied: protobuf>=3.9.2 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from tensorflow) (3.19.1)
Requirement already satisfied: termcolor>=1.1.0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: six>=1.12.0 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from tensorflow) (1.16.0)
Requirement already satisfied: setuptools in /root/venv/lib/python3.9/site-packages (from tensorflow) (57.4.0)
Requirement already satisfied: numpy>=1.20 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from tensorflow) (1.21.4)
Requirement already satisfied: absl-py>=0.4.0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (1.0.0)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /root/venv/lib/python3.9/site-packages (from tensorflow) (0.24.0)
Requirement already satisfied: h5py>=2.9.0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (3.6.0)
Requirement already satisfied: google-pasta>=0.1.1 in /root/venv/lib/python3.9/site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: flatbuffers>=1.12 in /root/venv/lib/python3.9/site-packages (from tensorflow) (2.0)
Requirement already satisfied: tf-estimator-nightly==2.8.0.dev2021122109 in /root/venv/lib/python3.9/site-packages (from tensorflow) (2.8.0.dev2021122109)
Requirement already satisfied: opt-einsum>=2.3.2 in /root/venv/lib/python3.9/site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: astunparse>=1.6.0 in /root/venv/lib/python3.9/site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: keras-preprocessing>=1.1.1 in /root/venv/lib/python3.9/site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: gast>=0.2.1 in /root/venv/lib/python3.9/site-packages (from tensorflow) (0.5.3)
Requirement already satisfied: libclang>=9.0.1 in /root/venv/lib/python3.9/site-packages (from tensorflow) (13.0.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.9/site-packages (from astunparse>=1.6.0->tensorflow) (0.37.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /root/venv/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (0.4.6)
Requirement already satisfied: markdown>=2.6.8 in /root/venv/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (3.3.6)
Requirement already satisfied: requests<3,>=2.21.0 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (2.26.0)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /root/venv/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (1.8.1)
Requirement already satisfied: werkzeug>=0.11.15 in /root/venv/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (2.0.3)
Requirement already satisfied: google-auth<3,>=1.6.3 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (2.3.3)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /root/venv/lib/python3.9/site-packages (from tensorboard<2.9,>=2.8->tensorflow) (0.6.1)
Requirement already satisfied: rsa<5,>=3.1.4 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (4.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (4.2.4)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.2.8)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /root/venv/lib/python3.9/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow) (1.3.1)
Requirement already satisfied: importlib-metadata>=4.4 in /root/venv/lib/python3.9/site-packages (from markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow) (4.11.0)
Requirement already satisfied: zipp>=0.5 in /root/venv/lib/python3.9/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow) (3.7.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.4.8)
Requirement already satisfied: certifi>=2017.4.17 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (2.0.9)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (1.26.7)
Requirement already satisfied: oauthlib>=3.0.0 in /root/venv/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow) (3.2.0)
WARNING: You are using pip version 21.2.3; however, version 22.0.3 is available.
You should consider upgrading via the '/root/venv/bin/python -m pip install --upgrade pip' command.
El mejor modelo es el número 3
<ipython-input-87-b568d916e192>:4: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
resultado["prediction"] = prediccion
<ipython-input-87-b568d916e192>:5: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
resultado["prediction"] = round(resultado["prediction"],0)
El tamaño del resultado es:24 filas y 3 columnas.
432
0
8
433
1
2
434
2
4
435
3
2
436
4
0
437
5
0
438
6
1
439
7
1
440
8
0
441
9
1