(6) Pandas data ranking, calculation, formatting

Data sorting and ranking Data sorting The sort_values() method is mainly used when sorting DataFrame df.sort_values(by,axis=0,ascending=True,inplace=False,kind=’quicksort’,na_position=’last’,ignore_index=False) Parameter description: by: the list of names to sort axis: axis, 0 means row, 1 means column, default row sorting ascending: ascending or descending order, Boolean value, you can use a Boolean value list to specify multiple sorting, descending […]

FFmpeg non-root user Linux deployment test, crop video duration and resolution, delete audio in video, replace audio command line, calculate VMAF SSIM PSNR

Article directory 1. FFmpeg non-root user Linux deployment test 2. FFmpeg common commands (update as needed) 1. FFmpeg non-root user Linux deployment test Refer to John Van Sickle – FAQ, the machine translation is as follows: FFmpeg static build tutorial A static build is basically a binary with all libraries included in the binary itself. […]

Process string formulas and convert them into mathematical formulas to calculate the results—no dependencies on the version—complete using the stack

Process string formulas and convert them into mathematical formulas to calculate the results: How to convert string to mathematical formula? 1. Dependencies need to be introduced **JEP (Java Math Expression Parser)** Library: EP is a powerful Java library for parsing and evaluating mathematical expressions. It supports variables, functions, constants, etc., and can handle various mathematical […]

RNA 37. Calculation of tumor immune infiltration score based on transcriptome in SCI article

This issue’s recommended software package xCell: digitally depicts the heterogeneous landscape of tissue cells, through which the immune infiltration score of the bulk transcriptome can be calculated. Let’s see how to achieve it! Introduction Tissues are complex environments composed of many cell types. In the field of cancer, understanding cellular heterogeneity in the tumor microenvironment […]

1. Zero drift calculation of ZL11-1A marine gravimeter

The ZL11-1A marine gravimeter performs static observations and simply calculates the zero point drift of the gravimeter. # -*- coding: utf-8 -*- “”” Write a version that does not generate time normalized files @author: SUN “”” import matplotlib.pyplot as plt from os import listdir import os from numpy import polyfit import datetime import matplotlib.dates as […]

Query active bonds-query corresponding yield-calculate spread

Query active coupons: from apis.factor_handler import FactorHandlerAPI from apis.quant_handler import QuantHandlerAPI from apis.market_handler import MarketHandlerAPI import datetime import pandas as pd import numpy as np import re importsys import os #Hidden function print def initialize_hidden_prints(activated=True): original_stdout = None if activated: original_stdout = sys.stdout sys.stdout = open(os.devnull, ‘w’) return original_stdout def open_hidden_prints(original_stdout): sys.stdout.close() sys.stdout = original_stdout […]

CSS property calculation process

CSS property calculation process Do you understand the property calculation process of CSS? Some students may say that I know CSS properties, for example: p{<!– –> color: red; } In the above CSS code, p is the element selector, and color is one of the CSS properties. But the calculation process of CSS properties is […]

vue-table implements merging of identical items and calculation across rows and columns

1. Use vxeTable <template> <div> <vxe-table border resizable:true :scroll-y=”{ enabled: false }” :span-method=”mergeRowMethod” :data=”tableData”> <vxe-column field=”mineralName” title=”Mineral name (mineral combination)”></vxe-column> <vxe-column field=”unitNmae” title=”Statistical Emergency and Resource Reserve Unit”></vxe-column> <vxe-column field=”brand” title=”Ore industry type and grade (brand)”></vxe-column> <vxe-column field=”quality” title=”Main components and quality indicators of ore”><template slot-scope=”scope”> <span v-if=”scope.row.wbsName == ””> <p>self-defined value</p> </span> <span v-if=”scope.row.wbsName […]