Posts

Showing posts from March 16, 2019

How to get a unit upper triangular matrix in LU factorization using python

Image
0 As scipy and numpy gives only unit lower triangular matrix, is it possible to get unit upper triangular matrix in LU factorization using linalg package? Or anyother method to follow to get the same would be appreciated. python scipy linear-algebra matrix-factorization share | improve this question edited Nov 26 '18 at 5:58 nixntwn asked Nov 25 '18 at 15:29 nixntwn nixntwn 1 1

Collecting Duplicate Column names from multiple DataFrames Python

Image
1 Essentially I am trying to create a list so that I can merge my Dataframes on Column names that are duplicated. Below is how I am currently set up. sheets = [df1, df2, df3, df4] col_list = dup_list = for i in sheets: col_list.append(i.columns.values) for c in col_list: if c.duplicated(): dup_list.append(c) I get the following error AttributeError: 'numpy.ndarray' object has no attribute 'duplicated' I know there is no method for duplicated. What is the best way to get the duplicated column names that appear in all dataframes. Any help is greatly appreciated. python pandas merge data-modeling share | improve this question