For example, there is an array:
1 1 1 0 2 0 1 1 2 1 0 0 2 1 1 To conclusion
0 - 4 1 - 8 2 - 3 Code:
import numpy as np import pandas as pd # Шаг 1. Load data file data_file = pd.read_excel('Arrayt.xlsx') # Шага 2. Выводит список элементов с частотами data_file.stack().value_counts().reset_index().rename(columns={'index':'val', 0:'count'})' # Сейчас просматриваю уроки по сохранению и выводу полученных данных на Шаге 2. At the very beginning, the task was formalized as follows:
Array is specified
A11 A12 A13 A14 A15 A16 ... A1n Need to withdraw
A12-A11 None A13-A11 A13-A12 None A14-A11 A14-A12 A14-A13 A15-A11 A15-A12 A15-A13 A16-A11 A16-A12 A16-A13 ... ... ... A1n-A11 A1n-A12 A1n-A12 I performed this part in an axial way in an ax way. Already imported array in Python (thanks forumchaninu MaxU). Again, thanks to the MaxU hint, each matrix element with frequencies has been output.
The task costs all implementation to transfer to Python