Saturday, October 17, 2020

DataFrames revisited

A DataFrame is an enhanced two-dimensional array. Like Series, DataFrames can have custom row and column indices, and offer additional operations and capabilities that make them more convenient for many data-science oriented tasks. DataFrames also support missing data. Each column in a DataFrame is...
Share:

Friday, October 16, 2020

Creating a Series

We can specify custom indices with the index keyword argument:In [12]: grades = pd.Series([87, 100, 94], index=['Wally', 'Eva', 'Sam'])In [13]: gradesOut[13]:Wally 87Eva 100Sam 94dtype: int64In this case, we used string indices, but you can use other immutable types, including integers not beginning...
Share:

Thursday, October 15, 2020

Producing Descriptive Statistics for a Series

Series provides many methods for common tasks including producing various descriptive statistics. Here in this post we will see count, mean, min, max and std (standard deviation):In [6]: grades.count()Out[6]: 3In [7]: grades.mean()Out[7]: 93.66666666666667In [8]: grades.min()Out[8]: 87In [9]: grades.max()Out[9]:...
Share:

Wednesday, October 14, 2020

pandas Series and DataFrames

 NumPy’s array is optimized for homogeneous numeric data that’s accessed via integer indices. Data science presents unique demands for which more customized data structures are required. Big data applications must support mixed data types, customized indexing, missing data, data that’s not structured...
Share:

Tuesday, October 13, 2020

Reshaping and Transposing

We’ve used array method reshape to produce two dimensional arrays from one-dimensional ranges. NumPy provides various other ways to reshape arrays.reshape vs. resizeThe array methods reshape and resize both enable you to change an array’s dimensions. Method reshape returns a view (shallow copy) of the...
Share:

Monday, October 12, 2020

Deep Copies

 Though views are separate array objects, they save memory by sharing element data from other arrays. However, when sharing mutable values, sometimes it’s necessary to create a deep copy with independent copies of the original data. This is especially important in multi-core programming, where...
Share:

Sunday, October 11, 2020

Views: Shallow Copies

View objects are objects that “see” the data in other objects, rather than having their own copies of the data. Views are also known as shallow copies. Various array methods and slicing operations produce views of an array’s data.The array method view returns a new array object with a view of the original...
Share:

Saturday, October 10, 2020

Friday, October 9, 2020

Thursday, October 8, 2020

Wednesday, October 7, 2020

Tuesday, October 6, 2020

Monday, October 5, 2020

Sunday, October 4, 2020

Saturday, October 3, 2020

Array-Oriented Programming with NumPy-1

The NumPy (Numerical Python) library first appeared in 2006 and is the preferred Python array implementation. It offers a high-performance, richly functional n-dimensional array type called ndarray, which from this point forward we’ll refer to by its synonym, array. NumPy is one of the many opensource...
Share:

Friday, October 2, 2020

Thursday, October 1, 2020

Recommendation systems

Recommendation systems are another example of AI technology that has been weaved into our everyday lives. Amazon, YouTube, Netflix, LinkedIn, and Facebook all rely on recommendation technology and we don't even realize we are using it. Recommendation systems rely heavily on data and the more data that...
Share: