【xlwings api语言参考】Range.FindPrevious 方法

xlwings操作汇总 2.range.api 区域的操作 range.api形式,实现:Copy--复制,Clear--清除,Delete--删除,Find--查找,Replace--替换,Sort--排序,AutoFilter--筛选,RemoveDuplicates--删除重复项 阅读详情

功能:
继续使用 Find 方法开始 的 搜索。 查找匹配相同条件的上一个单元格,并返回代表该单元格的 Range 对象。 不影响选定内容或活动单元格。

语法:
rng.FindPrevious (Before)
rng是一个表示 Range 对象的变量。

参数:
名称 必需/可选 数据类型 说明
Before 可选 Range对象 指定一个单元格,查找将从该单元格之前开始。 此单元格对应于从用户界面搜索时的活动单元格的位置。 请注意 ,Before 必须是范围中的单个单元格。

请记住,搜索在此单元格之前开始;在方法环绕到此单元格之前,不搜索指定的单元格。 如果未指定此参数,则搜索从区域左上角单元格之前开始。

返回值:
Range

备注:
当查找到指定查找区域的起始位置时,本方法将环绕至区域的末尾继续搜索。 若要在发生此绕回时停止搜索,请保存第一个找到的单元格的地址,然后针对此保存的地址测试每个连续找到的单元格地址。

示例:
本示例演示 FindPrevious 方法如何与 Find 方法和 FindNext 方法一起使用。 在运行此示例之前,请确保 Sheet1 在 B 列中至少包含两个单词。

rng=sht.api.Columns('B')
python xlwings实际案例---查找一个表是否在另一个表中出现过 首先说一下开发背景。作为一名班级干部,经常会组织开会签到或者群内接龙的问题,尤其是现在班级人员每天做检查,做了的都需要在群内接龙方便我们进行统计及时知道谁没做。然而当班级人数比较多而接龙人数也比较多时就会出现只有那么几个人没接龙但是自己一个一个对信息表工作量实在太大,在群里直接问也很可能半天没回应也不知道都有谁没接,而且也会让这少部分人尴尬。于是我想到了用代码来解决这一问题。但是接龙人员的接龙方式很多时候和规定格式会有一些出入,而用Excel的vlookup还需要尽量保持两个表的一致性实在太麻烦。因为接触过 阅读详情

相关推荐

python中用xlwings逐一筛选包含有特定数据的工作表

xlwings下的autofilter的一些应用技巧

yy_dengpeiyou的博客 943

python xlwings库对于excel单元格的操作

文章目录前言一、xlwings获取单元格的数据与格式二、xlwings修改单元格的数据与格式总结 前言 在上一篇文章传送门介绍了xlwings库对于单元格的简单操作,本篇文章继续介绍xlwings对于excel单元格的其他操作。 一、xlwings获取单元格的数据与格式 excel的单元格存储有数据也有其对应的格式,下面代码将介绍xlwings获取单元格的数据与格式的方法: import xlwings as xw import numpy as np import pandas as pd # r

高心星的专栏 5753

CMake、Make、MinGw、Clang、Llvm、GCC、MSVC的区别

除开 GCC (GNU 编译器集合) 以外,MinGW 还包含有一些其他的 GNU 程序开发工具;的缩写,MinGw是windows版本的gcc集合。并不仅是一个 C/C++ 编译器,而是一套。是微软开发的VC运行时库,3、Make和CMake是。

m0_37698164的博客 1万+

安路FPGA时序约束实战:从RGMII翻车到SDC文件编写与调试

在FPGA开发中,时序约束是保证高速接口稳定工作的基础。通过SDC文件定义时钟、输入输出延迟等参数,工具才能正确分析建立时间和保持时间。合理的时序约束能避免信号亚稳态、数据错位等问题,尤其适用于RGMII、LVDS等源同步接口。在工业相机、通信设备等场景中,时序收敛直接决定系统可靠性。本文以安路TD软件为例,深入解析时序约束方法、SDC编写逻辑及硬件调试技巧,帮助开发者解决RGMII接口时序违例问题。

weixin_34198762的博客 399

FPGA数据采集避坑指南:3PA1030 ADC的时钟相位、量程标志OVR与输出使能OE到底怎么用?

本文深入解析FPGA与3PA1030 ADC协同设计中的关键问题,包括时钟相位优化、OVR超量程监控和OE输出使能配置。通过实战案例和代码示例,详细探讨如何避免常见设计陷阱,提升数据采集系统的信噪比和稳定性,特别适合AD和FPGA开发者参考。

weixin_42620340的博客 1914

MQL5教程 01 MT5有关EA的操作、MetaEditor 工具栏主要功能

MQL5教程 01 MT5有关EA的操作、MetaEditor 工具栏主要功能

weixin_42830015的博客 4005

AI Agent驱动的多模态情感分析方法:从BERT到Vision Transformer的探索

情感分析(Sentiment Analysis)是自然语言处理(NLP)与计算机视觉(CV)中一项重要任务。传统的情感分析主要依赖于文本数据,但在现实应用中,情感往往通过 语言、语音、表情、姿态 等多模态信号共同传达。因此,结合 多模态深度学习 的 AI Agent 在情感理解中具有广阔的前景。

一键难忘的博客 744

基于VisionMaster实现数据实时存储至MySQL (二)

摘要:之前的分享主要聚焦于简单的一维数据实时存储。但在做缺陷检测项目时,情况往往更加复杂:一张检测图像中可能同时存在多个缺陷,每个缺陷都有一组独立的核心参数(如质心、长短轴、面积等)。如何在 MySQL 中记录这些成组出现的缺陷数据,而不只是简单的单条记录?

haier123888的博客 228

195、大模型蒸馏与压缩:知识蒸馏与VLA模型轻量化

折腾完这一整套流程,最大的感悟是:知识蒸馏不是简单的模型压缩,而是知识迁移的工程艺术。每一步都有坑,每个参数都可能影响最终性能。给后来者的建议是:先别急着上蒸馏,把teacher模型的推理延迟和显存占用测清楚,确定瓶颈在哪里——是计算量太大还是内存带宽不够,这决定了你该用蒸馏还是量化还是剪枝。蒸馏训练时一定要监控每一层的特征对齐loss,别只看总loss。如果某一层的对齐loss特别高,说明student在这一层学歪了,需要调整该层的损失权重或者增加该层的投影头容量。

sundong_81的博客 119

Doris磁盘空间管理(生命周期管理、清理磁盘空间方法)

在进行数据仓库开发时,比较头疼的是历史数据不删除,磁盘空间不断增长,如果磁盘空间不足时,spark调度任务写入时就会报错。

大模型大数据攻城狮的专栏 1725

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

上一篇: 【xlwings api语言参考】Range.FindNext 方法
下一篇: 【xlwings api语言参考】Range.FlashFill 方法
DataLab
博客等级 码龄7年 43粉丝 178原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

DataLab

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址