
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

133 Views
To multiply the Hermite_e series by x, where x is the independent variable, use the polynomial.hermite.hermemulx() method in Python Numpy. The method returns an array representing the result of the multiplication. The parameter, c is a 1-D array of Hermite_e series coefficients ordered from low to high.StepsAt first, import the required library −import numpy as np from numpy.polynomial import hermite_e as HCreate an array −c = np.array([1, 2, 3])Display the array −print("Our Array...", c)Check the Dimensions −print("Dimensions of our Array...", c.ndim)Get the Datatype −print("Datatype of our Array object...", c.dtype)Get the Shape −print("Shape of our Array object...", c.shape)To multiply the Hermite_e ... Read More

140 Views
To subtract one Hermite_e series to another, use the polynomial.hermite.hermesub() method in Python Numpy. The method returns an array representing the Hermite_e series of their difference. Returns the difference of two Hermite_e series c1 - c2. The sequences of coefficients are from lowest order term to highest, i.e., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. The parameters c1 and c2 are 1-D arrays of Hermite_e series coefficients ordered from low to high.StepsAt first, import the required library −import numpy as np from numpy.polynomial import hermite_e as HCreate 1-D arrays of Hermite_e series coefficients −c1 = np.array([1, ... Read More

148 Views
To add one Hermite_e series to another, use the polynomial.hermite.heremadd() method in Python Numpy. The method returns an array representing the Hermite_e series of their sum. Returns the sum of two Hermite_e series c1 + c2. The arguments are sequences of coefficients ordered from lowest order term to highest, i.e., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. The parameters c1 and c2 are 1-D arrays of Hermite_e series coefficients ordered from low to high.StepsAt first, import the required library −import numpy as np from numpy.polynomial import hermite_e as HCreate 1-D arrays of Hermite_e series coefficients −c1 ... Read More

438 Views
To convert a polynomial to a Legendre series, use the legendre.poly2lag() method in Python Numpy. Convert an array representing the coefficients of a polynomial ordered from lowest degree to highest, to an array of the coefficients of the equivalent Legendre series, ordered from lowest to highest degree. The method returns a 1-D array containing the coefficients of the equivalent Legendre series. The parameter pol, is a 1-D array containing the polynomial coefficientsStepsAt first, import the required library −import numpy as np from numpy.polynomial import legendre as LCreate an array using the numpy.array() method −c = np.array([1, 2, 3, 4, 5])Display ... Read More

5K+ Views
In the pandas series constructor, the method called dropna() is used to remove missing values from a series object. And it does not update the original series object with removed NaN values instead of updating the original series object, it will return another series object with updated values.The parameters of the dropna() method are axis, inplace, and how.Example 1# importing packages import pandas as pd import numpy as np # Creating Series objects sr = pd.Series([42, np.nan, 55, 42, np.nan, 73, np.nan, 55, 76, 87], index=list("ABCDEFGHIJ")) print('Series object:', sr) # Remove missing elements result = sr.dropna() ... Read More

1K+ Views
In the pandas series constructor, there is a method called drop() which is used to remove specified rows from the pandas series object. It won’t update the original series object with deleted rows instead of updating the original series object, it will return another series object with the removed rows.We can use this drop() method on both labeled-based and positional-indexed series objects.It will raise a Key error if the specified row labels are not found in the index of the series object. We can suppress the errors by setting the errors parameter from raise to ignore. And we have some ... Read More

16K+ Views
The pandas series.drop() method is used to remove a specific row from the pandas series object. And It will return a series object with the removed row.The drop() method can be applied to both labeled-based and position index abased series objects. The parameters of this drop() method are labels, axis, level, inplace, and raise.It will raise a Key error if the specified row label is not found in the index of the series object. We can suppress the errors by setting the errors parameter from raise to ignore.Example 1# import pandas package import pandas as pd # Creating Series ... Read More

139 Views
The Series.divmod() method in the pandas series constructor is used to perform both integer division and modular division operations on series objects with a scalar, or we can apply this divmod() method on two series also.The method performs an element-wise division operation of its two input objects. And it returns a python tuple with two series objects, the first series of the tuple is representing the integer division output, and the second series object of the tuple representing the modulo division output.Example 1import pandas as pd # create pandas Series series = pd.Series([25, 48, 18, 99, 61]) print("Series ... Read More

347 Views
The divmod() method in the pandas series constructor is used to perform integer division and modulo of two series objects. We can calculate the divmod() of one series with a scalar value. And we can perform element-wise divmod() operation.The method returns a python tuple with two series objects, the first series of the tuple is representing the integer division results, and the second series object of the tuple representing the modulo division results.The method performs an element-wise division operation of two series objects. There is a parameter called fill_value, which is used to fill the specified values in the place ... Read More

668 Views
The series.dot() method in pandas series is used to perform the dot product operation of two pandas series objects. In mathematics, a dot product of two sequences is given by Sum of multiplication of values at each sequence.The series.dot() takes only one parameter which is another object, it takes a series or an array-like object to perform dot product between elements of each object.Example 1# import pandas packages import pandas as pd # Creating Series objects series1 = pd.Series([1, 0, 5, 2]) print('First series object:', series1) series2 = pd.Series([3, 7, 2, 9]) print('second series object:', series2) ... Read More