From 38dd51f79d2eb855618a5cbb33f41523dc81fc75 Mon Sep 17 00:00:00 2001 From: Maryam0330 Date: Tue, 15 Oct 2024 17:48:08 +0530 Subject: [PATCH] Updated --- Stock_prediction_Data_Analysis.ipynb | 264 ++++++++++++++++++++++++++- 1 file changed, 262 insertions(+), 2 deletions(-) diff --git a/Stock_prediction_Data_Analysis.ipynb b/Stock_prediction_Data_Analysis.ipynb index 2da9745..c683bd8 100644 --- a/Stock_prediction_Data_Analysis.ipynb +++ b/Stock_prediction_Data_Analysis.ipynb @@ -197,6 +197,228 @@ "df.head(10)" ] }, + { + "cell_type": "code", + "execution_count": 4, + "id": "eec26960", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
DateOpenHighLowCloseAdj CloseVolume
706429-01-2024619.000000629.500000615.599976622.950012622.95001219572140.0
706530-01-2024625.450012633.500000624.200012626.750000626.75000016966577.0
706631-01-2024626.400024643.200012622.000000640.500000640.50000023270745.0
706701-02-2024642.750000652.950012633.250000647.650024647.65002426587707.0
706802-02-2024652.000000660.549988646.700012649.650024649.65002427471811.0
706905-02-2024647.099976654.799988638.750000642.950012642.95001228339525.0
707006-02-2024644.450012655.000000637.700012650.250000650.25000014079390.0
707107-02-2024655.049988677.950012655.000000675.250000675.25000041696232.0
707208-02-2024680.400024718.900024678.500000699.549988699.54998874222434.0
707309-02-2024703.650024728.349976694.200012725.250000725.25000043235061.0
\n", + "
" + ], + "text/plain": [ + " Date Open High Low Close Adj Close \\\n", + "7064 29-01-2024 619.000000 629.500000 615.599976 622.950012 622.950012 \n", + "7065 30-01-2024 625.450012 633.500000 624.200012 626.750000 626.750000 \n", + "7066 31-01-2024 626.400024 643.200012 622.000000 640.500000 640.500000 \n", + "7067 01-02-2024 642.750000 652.950012 633.250000 647.650024 647.650024 \n", + "7068 02-02-2024 652.000000 660.549988 646.700012 649.650024 649.650024 \n", + "7069 05-02-2024 647.099976 654.799988 638.750000 642.950012 642.950012 \n", + "7070 06-02-2024 644.450012 655.000000 637.700012 650.250000 650.250000 \n", + "7071 07-02-2024 655.049988 677.950012 655.000000 675.250000 675.250000 \n", + "7072 08-02-2024 680.400024 718.900024 678.500000 699.549988 699.549988 \n", + "7073 09-02-2024 703.650024 728.349976 694.200012 725.250000 725.250000 \n", + "\n", + " Volume \n", + "7064 19572140.0 \n", + "7065 16966577.0 \n", + "7066 23270745.0 \n", + "7067 26587707.0 \n", + "7068 27471811.0 \n", + "7069 28339525.0 \n", + "7070 14079390.0 \n", + "7071 41696232.0 \n", + "7072 74222434.0 \n", + "7073 43235061.0 " + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Display the last 10 rows of the DataFrame\n", + "df.tail(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "23974fec", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Columns: Index(['Date', 'Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume'], dtype='object')\n" + ] + } + ], + "source": [ + "# Display the columns in the DataFrame\n", + "print(\"Columns:\", df.columns)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "538be913", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Data Types: Date object\n", + "Open float64\n", + "High float64\n", + "Low float64\n", + "Close float64\n", + "Adj Close float64\n", + "Volume float64\n", + "dtype: object\n" + ] + } + ], + "source": [ + "# Display the data types of each column\n", + "print(\"Data Types:\", df.dtypes)" + ] + }, { "cell_type": "code", "execution_count": 4, @@ -218,6 +440,44 @@ "df.shape" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "ce71bbd5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Size of DataFrame: 49518\n" + ] + } + ], + "source": [ + "# Display the size of the DataFrame\n", + "print(\"Size of DataFrame:\", df.size)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "5ffbb9a3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numeric Columns: Index(['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume'], dtype='object')\n" + ] + } + ], + "source": [ + "# Display numeric columns in the DataFrame\n", + "print(\"Numeric Columns:\", df.select_dtypes(include=[np.number]).columns)" + ] + }, { "cell_type": "code", "execution_count": 5, @@ -1057,7 +1317,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -1071,7 +1331,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.11.9" } }, "nbformat": 4,