From Algorithms to AI: The Evolution of Programming in the Age of Generative Intelligence The dynamics of programming have undergone an immense transformation from the primary first algorithms of mechanical computing to complicated AI slopes which are the features of the digital generation. Thus, this shift from algorithms to AI …
Read More »Data Visualization in Pandas – Data Science Tutorials
16- Data Visualization Data Visualization in Pandas¶ In [1]: #importing the libraries import matplotlib.pyplot as plt import numpy as np import pandas as pd Plotting graph with plot() method¶ In [2]: data=pd.Series(np.random.randn(1000).cumsum()) data Out[2]: 0 -0.584127 1 -1.377490 2 -0.882970 3 0.461625 4 0.822463 ... 995 -28.696661 996 -28.190823 997 -29.000591 998 …
Read More »Pivot Tables – Data Science Tutorials
15- Pivot Tables Pivot Tables¶The Pandas pivot_table() is used to calculate, aggregate, and summarize your data. It is defined as a powerful tool that aggregates data with calculations such as Sum, Count, Average, Max, and Min. It also allows the user to sort and filter your data when the pivot …
Read More »Groupby in Pandas – Data Science Tutorials
14- Groupby Groupby in Pandas¶Pandas groupby is used for grouping the data according to the categories and apply a function to the categories. It also helps to aggregate data efficiently. In [2]: #import the libraries import pandas as pd import numpy as np In [3]: ipl_data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', …
Read More »Combining and Merging in Pandas – Data Science Tutorials
13- Combining and Merging Combining and Merging in Pandas¶The datasets you want to analyze can come from different sources. Before starting data analyses, you may want to merge these datasets. To combine datasets, you can use the merge, join, and concat methods in Pandas. Pandas has full-featured, high performance in-memory …
Read More »Hierarchical Indexing – Data Science Tutorials
12- Hierarchical Indexing Hierarchical Indexing¶ Up to this point we’ve been focused primarily on one-dimensional and two-dimensional data, stored in Pandas Series and DataFrame objects, respectively. Often it is useful to go beyond this and store higher-dimensional data—that is, data indexed by more than one or two keys. While Pandas …
Read More »Data Transformation in Pandas – Data Science Tutorials
11- Data Transformation Data Transformation in Pandas¶ In [1]: #import libraries import pandas as pd import numpy as np Finding Duplicate Values¶ In [2]: data=pd.DataFrame({"a":[1,5]*3,"b":[1,1,2,3,2,3]}) data Out[2]: a b 0 1 1 1 5 1 2 1 2 3 5 3 4 1 2 5 5 3 In [3]: #To see whether the …
Read More »Missing Data In Pandas – Data Science Tutorials
10- Missing Data Missing Data In Pandas¶ Real-world data is dirty. It is important to preprocess the data before analyzing the data. In [1]: #importing libraries import pandas as pd import numpy as np Note: Missing data in the Pandas is represented by the value NaN (Not a Number) 1. Handling …
Read More »JSON and Quandl API Data – Data Science Tutorials
09 – JSON and Quandl API Data JSON and Quandl API Data¶ https://data.nasdaq.com/data/BSE-bombay-stock-exchange In [ ]: pip install quandl Get Data by Quandl API¶ In [1]: import quandl data = quandl.get("BSE/BOM543207", authtoken="x8VdDXzBty3iGsaRLTVs") data Out[1]: Open High Low Close WAP No. of Shares No. of Trades Total Turnover Deliverable Quantity % Deli. Qty to …
Read More »Reading and Writing Data in Pandas – Data Science Tutorials
08- Reading and Writing Reading and Writing data in Pandas¶ In [6]: #import libraries import pandas as pd import numpy as np 1. Reading from TEXT File¶ Let’s read a dataset named data.txt in the working directory. In [8]: df=pd.read_table("data.txt") df Out[8]: Name,Score,Age 0 A,80,28 1 B,85,25 2 C,70,23 3 D,90,20 4 …
Read More »