Skip to content

Tag: pandas

How to count the same rows between multiple CSV files in Pandas?

I merged 3 different CSV(D1,D2,D3) Netflow datasets and created one big dataset(df), and applied KMeans clustering to this dataset. To merge them I did not use pd.concat because of memory error and solved with Linux terminal. All these datasets contain the same column names, they have 12 columns(all numerical values) Example expected result: cluster_0 has xxxx numbers of same rows

How to find if if a particular column has zero value in a dataframe?

Trust you all are doing well! I have this dataframe that contains 0 and float numbers in column (‘BP_MOVE’) , there could be two conditions Zero in any row of column (‘BP_MOVE’) Zero in each row of column (‘BP_MOVE’) Below is what i have tried, the first python statement covers the second case very well where each row has 0