当前位置: 首页 > news >正文

软件开发和网站开发哪个更好cms系统创建静态网站

软件开发和网站开发哪个更好,cms系统创建静态网站,怎么开通网络,北京网站制作招聘目录 一、用法精讲 211、pandas.Series.truncate方法 211-1、语法 211-2、参数 211-3、功能 211-4、返回值 211-5、说明 211-6、用法 211-6-1、数据准备 211-6-2、代码示例 211-6-3、结果输出 212、pandas.Series.where方法 212-1、语法 212-2、参数 212-3、功能…目录 一、用法精讲 211、pandas.Series.truncate方法 211-1、语法 211-2、参数 211-3、功能 211-4、返回值 211-5、说明 211-6、用法 211-6-1、数据准备 211-6-2、代码示例 211-6-3、结果输出 212、pandas.Series.where方法 212-1、语法 212-2、参数 212-3、功能 212-4、返回值 212-5、说明 212-6、用法 212-6-1、数据准备 212-6-2、代码示例 212-6-3、结果输出 213、pandas.Series.mask方法 213-1、语法 213-2、参数 213-3、功能 213-4、返回值 213-5、说明 213-6、用法 213-6-1、数据准备 213-6-2、代码示例 213-6-3、结果输出 214、pandas.Series.add_prefix方法 214-1、语法 214-2、参数 214-3、功能 214-4、返回值 214-5、说明 214-6、用法 214-6-1、数据准备 214-6-2、代码示例 214-6-3、结果输出 215、pandas.Series.add_suffix方法 215-1、语法 215-2、参数 215-3、功能 215-4、返回值 215-5、说明 215-6、用法 215-6-1、数据准备 215-6-2、代码示例 215-6-3、结果输出 二、推荐阅读 1、Python筑基之旅 2、Python函数之旅 3、Python算法之旅 4、Python魔法之旅 5、博客个人主页 一、用法精讲 211、pandas.Series.truncate方法 211-1、语法 # 211、pandas.Series.truncate方法 pandas.Series.truncate(beforeNone, afterNone, axisNone, copyNone) Truncate a Series or DataFrame before and after some index value.This is a useful shorthand for boolean indexing based on index values above or below certain thresholds.Parameters: beforedate, str, int Truncate all rows before this index value.afterdate, str, int Truncate all rows after this index value.axis{0 or ‘index’, 1 or ‘columns’}, optional Axis to truncate. Truncates the index (rows) by default. For Series this parameter is unused and defaults to 0.copybool, default is True, Return a copy of the truncated section.NoteThe copy keyword will change behavior in pandas 3.0. Copy-on-Write will be enabled by default, which means that all methods with a copy keyword will use a lazy copy mechanism to defer the copy and ignore the copy keyword. The copy keyword will be removed in a future version of pandas.You can already get the future behavior and improvements through enabling copy on write pd.options.mode.copy_on_write TrueReturns: type of caller The truncated Series or DataFrame. 211-2、参数 211-2-1、before(可选默认值为None)截取的起始位置包含此索引值。如果未指定则从Series的第一个索引开始。 211-2-2、after(可选默认值为None)截取的结束位置包含此索引值。如果未指定则截取到Series的最后一个索引。 211-2-3、axis(可选默认值为None)未使用保留参数。 211-2-4、copy(可选默认值为None)是否复制返回的数据。如果为False则返回的Series是原始数据的视图而不是副本。 211-3、功能 用于截取Series对象的一部分数据通常用于在时间序列数据或带有特定索引的数据集中选取特定范围的数据。 211-4、返回值 返回一个pandas.Series对象包含在before和after参数指定的范围内的元素。 211-5、说明 无 211-6、用法 211-6-1、数据准备 无 211-6-2、代码示例 # 211、pandas.Series.truncate方法 # 211-1、截取指定范围的数据 import pandas as pd s pd.Series([10, 20, 30, 40, 50, 60, 70, 80], index[1, 2, 3, 4, 5, 6, 7, 8]) result s.truncate(before3, after6) print(result, end\n\n)# 211-2、截取从索引4到最后的数据 import pandas as pd s pd.Series([10, 20, 30, 40, 50, 60, 70, 80], index[1, 2, 3, 4, 5, 6, 7, 8]) result s.truncate(before4) print(result, end\n\n)# 211-3、截取从开头到索引5的数据 import pandas as pd s pd.Series([10, 20, 30, 40, 50, 60, 70, 80], index[1, 2, 3, 4, 5, 6, 7, 8]) result s.truncate(after5) print(result) 211-6-3、结果输出 # 211、pandas.Series.truncate方法 # 211-1、截取指定范围的数据 # 3 30 # 4 40 # 5 50 # 6 60 # dtype: int64# 211-2、截取从索引4到最后的数据 # 4 40 # 5 50 # 6 60 # 7 70 # 8 80 # dtype: int64# 211-3、截取从开头到索引5的数据 # 1 10 # 2 20 # 3 30 # 4 40 # 5 50 # dtype: int64 212、pandas.Series.where方法 212-1、语法 # 212、pandas.Series.where方法 pandas.Series.where(cond, othernan, *, inplaceFalse, axisNone, levelNone) Replace values where the condition is False.Parameters: cond bool Series/DataFrame, array-like, or callable Where cond is True, keep the original value. Where False, replace with corresponding value from other. If cond is callable, it is computed on the Series/DataFrame and should return boolean Series/DataFrame or array. The callable must not change input Series/DataFrame (though pandas doesn’t check it).other scalar, Series/DataFrame, or callable Entries where cond is False are replaced with corresponding value from other. If other is callable, it is computed on the Series/DataFrame and should return scalar or Series/DataFrame. The callable must not change input Series/DataFrame (though pandas doesn’t check it). If not specified, entries will be filled with the corresponding NULL value (np.nan for numpy dtypes, pd.NA for extension dtypes).inplace bool, default False Whether to perform the operation in place on the data.axis int, default None Alignment axis if needed. For Series this parameter is unused and defaults to 0.level int, default None Alignment level if needed.Returns: Same type as caller or None if inplaceTrue. 212-2、参数 212-2-1、cond(必须)布尔型数组条件表达式或Series它用于指定要保留的元素。当条件为True时保留原值为False时替换为other的值。 212-2-2、other(可选默认值为nan)用来替换不满足条件的元素的值默认情况下这些元素会被替换为NaN。 212-2-3、inplace(可选默认值为False)如果为True则在原地修改Series对象而不是返回修改后的副本。 212-2-4、axis(可选默认值为None)未使用保留参数。 212-2-5、level(可选默认值为None)如果Series是多层索引的可以指定操作的索引层次。 212-3、功能 用于基于条件对Series数据进行筛选和替换它根据给定的布尔条件保留或替换Series中的值。 212-4、返回值 返回一个pandas.Series对象其中原来的数据根据cond条件被筛选和替换。 212-5、说明 无 212-6、用法 212-6-1、数据准备 无 212-6-2、代码示例 # 212、pandas.Series.where方法 # 212-1、基本用法 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.where(s 2) print(result, end\n\n)# 212-2、指定替换值 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.where(s 2, other-1) print(result, end\n\n)# 212-3、使用布尔条件 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.where(s % 2 0, otherodd) print(result, end\n\n)# 212-4、原地修改 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) s.where(s 2, other-1, inplaceTrue) print(s) 212-6-3、结果输出 # 212、pandas.Series.where方法 # 212-1、基本用法 # 0 NaN # 1 NaN # 2 3.0 # 3 4.0 # 4 5.0 # dtype: float64# 212-2、指定替换值 # 0 -1 # 1 -1 # 2 3 # 3 4 # 4 5 # dtype: int64# 212-3、使用布尔条件 # 0 odd # 1 2 # 2 odd # 3 4 # 4 odd # dtype: object# 212-4、原地修改 # 0 -1 # 1 -1 # 2 3 # 3 4 # 4 5 # dtype: int64 213、pandas.Series.mask方法 213-1、语法 # 213、pandas.Series.mask方法 pandas.Series.mask(cond, other_NoDefault.no_default, *, inplaceFalse, axisNone, levelNone) Replace values where the condition is True.Parameters: cond bool Series/DataFrame, array-like, or callable Where cond is False, keep the original value. Where True, replace with corresponding value from other. If cond is callable, it is computed on the Series/DataFrame and should return boolean Series/DataFrame or array. The callable must not change input Series/DataFrame (though pandas doesn’t check it).other scalar, Series/DataFrame, or callable Entries where cond is True are replaced with corresponding value from other. If other is callable, it is computed on the Series/DataFrame and should return scalar or Series/DataFrame. The callable must not change input Series/DataFrame (though pandas doesn’t check it). If not specified, entries will be filled with the corresponding NULL value (np.nan for numpy dtypes, pd.NA for extension dtypes).inplace bool, default False Whether to perform the operation in place on the data.axis int, default None Alignment axis if needed. For Series this parameter is unused and defaults to 0.level int, default None Alignment level if needed.Returns: Same type as caller or None if inplaceTrue. 213-2、参数 213-2-1、cond(必须)布尔型数组条件表达式或Series它用于指定要替换的元素。当条件为True时替换为other的值为False时保留原值。 213-2-2、other(可选)用来替换满足条件的元素的值默认情况下这些元素会被替换为NaN。 213-2-3、inplace(可选默认值为False)如果为True则在原地修改Series对象而不是返回修改后的副本。 213-2-4、axis(可选默认值为None)未使用保留参数。 213-2-5、level(可选默认值为None)如果Series是多层索引的可以指定操作的索引层次。 213-3、功能 用于替换Series数据中的元素。如果满足指定的条件(cond)则将这些元素替换为other的值否则保留原值。 213-4、返回值 返回一个pandas.Series对象其中原来的数据根据cond条件被筛选和替换。 213-5、说明 无 213-6、用法 213-6-1、数据准备 无 213-6-2、代码示例 # 213、pandas.Series.mask方法 # 213-1、基本用法 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.mask(s 2) print(result, end\n\n)# 213-2、指定替换值 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.mask(s 2, other-1) print(result, end\n\n)# 213-3、使用布尔条件 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) result s.mask(s % 2 0, othereven) print(result, end\n\n)# 213-4、原地修改 import pandas as pd s pd.Series([1, 2, 3, 4, 5]) s.mask(s 2, other-1, inplaceTrue) print(s) 213-6-3、结果输出 # 213、pandas.Series.mask方法 # 213-1、基本用法 # 0 1.0 # 1 2.0 # 2 NaN # 3 NaN # 4 NaN # dtype: float64# 213-2、指定替换值 # 0 1 # 1 2 # 2 -1 # 3 -1 # 4 -1 # dtype: int64# 213-3、使用布尔条件 # 0 1 # 1 even # 2 3 # 3 even # 4 5 # dtype: object# 213-4、原地修改 # 0 1 # 1 2 # 2 -1 # 3 -1 # 4 -1 # dtype: int64 214、pandas.Series.add_prefix方法 214-1、语法 # 214、pandas.Series.add_prefix方法 pandas.Series.add_prefix(prefix, axisNone) Prefix labels with string prefix.For Series, the row labels are prefixed. For DataFrame, the column labels are prefixed.Parameters: prefixstr The string to add before each label.axis{0 or ‘index’, 1 or ‘columns’, None}, default None Axis to add prefix onNew in version 2.0.0.Returns: Series or DataFrame New Series or DataFrame with updated labels. 214-2、参数 214-2-1、prefix(必须)字符串类型表示要添加到索引标签前的前缀。 214-2-2、axis(可选默认值为None)虽然存在这个参数但在Series中没有实际意义因为Series没有轴的概念。 214-3、功能 通过为Series的索引标签添加一个指定的前缀返回一个新的Series对象。 214-4、返回值 返回一个pandas.Series对象其索引标签被添加了指定的前缀。 214-5、说明 无 214-6、用法 214-6-1、数据准备 无 214-6-2、代码示例 # 214、pandas.Series.add_prefix方法 import pandas as pd s pd.Series([1, 2, 3], index[a, b, c]) result s.add_prefix(item_) print(result) 214-6-3、结果输出 # 214、pandas.Series.add_prefix方法 # item_a 1 # item_b 2 # item_c 3 # dtype: int64 215、pandas.Series.add_suffix方法 215-1、语法 # 215、pandas.Series.add_suffix方法 pandas.Series.add_suffix(suffix, axisNone) Suffix labels with string suffix.For Series, the row labels are suffixed. For DataFrame, the column labels are suffixed.Parameters: suffixstr The string to add after each label.axis{0 or ‘index’, 1 or ‘columns’, None}, default None Axis to add suffix onNew in version 2.0.0.Returns: Series or DataFrame New Series or DataFrame with updated labels. 215-2、参数 215-2-1、suffix(必须)字符串类型表示要添加到索引标签后的后缀。 215-2-2、axis(可选默认值为None)虽然存在这个参数但在Series中没有实际意义因为Series没有轴的概念。 215-3、功能 用于为Series的索引标签添加一个后缀和add_prefix类似axis参数在Series中没有实际意义因为Series是一维的。 215-4、返回值 返回一个pandas.Series对象其索引标签被添加了指定的后缀。 215-5、说明 无 215-6、用法 215-6-1、数据准备 无 215-6-2、代码示例 # 215、pandas.Series.add_suffix方法 import pandas as pd s pd.Series([1, 2, 3], index[a, b, c]) result s.add_suffix(_item) print(result) 215-6-3、结果输出 # 215、pandas.Series.add_suffix方法 # a_item 1 # b_item 2 # c_item 3 # dtype: int64 二、推荐阅读 1、Python筑基之旅 2、Python函数之旅 3、Python算法之旅 4、Python魔法之旅 5、博客个人主页
http://www.sczhlp.com/news/200730/

相关文章:

  • 商城门户网站源码国产免费cad软件下载
  • 成都网站建设939wordpress python api
  • 一对一直播源码搭建:后来者的源码选择与专业研发的关键考量
  • 总氮检测仪靠谱供应商,总氮水质分析仪厂家推荐,总磷/氨氮/COD等仪器哪家好?
  • 多领域对话自动评估技术突破
  • 无备案网站如何赚钱重庆无障碍网站建设
  • 温州快速网站推广公司网络爬虫需要自己做网站吗
  • 建立官方网站大型网站解决方案设计
  • flash网站标题和网址win10建设网站
  • 凡科建站官网电脑版wordpress文章不显示摘要
  • 黑龙江电商网站建设创建网站服务器
  • 自适应网站的代表陕西 网站建设 陕ICP
  • html5黑色网站展厅设计策划方案
  • 国外做的好的鲜花网站网站做百度百科
  • 中国建设银行什么是网站用户名电商网站及企业微信订烟
  • 百度网站推广怎么做东莞做微网站建设价格
  • 南京网站推广营销公司哪家好wordpress填表插件
  • 怎么用wordpress建立本地网站百度地图导航2022最新版下载
  • 关于建设网站的请示自学网站有哪些自学网
  • 【隐语SecretFlow社区】万字长文解读构建可信数据空间相关标准
  • 直面挑战:MySQL 千万级数据高性能优化实战指南
  • 泳池水检测仪厂家推荐,余氯检测仪哪个品牌好?COD水质/总氮/氨氮靠谱供应商
  • 网站是如何建立的呢网上开店的货源渠道有哪些
  • 昆明网站建设公司_集图网
  • 网站的建设费计入无形资产吗设计企业网站主页图片
  • 学校后勤网站建设的作用网站首页面设计
  • 办一个购物网站要多少钱商城类网站如何做
  • 做交易网站许昌网页制作
  • 网站流量数据查询wordpress 获取豆瓣 api 书籍信息
  • 苏州网站建设 牛辽阳网站建设