本文作为MySQL使用指南
的延申讨论
- 递归
- 行列转换
- 日期/时间处理相关函数
一. 递归

As mentioned previously, recursive common table expressions (CTEs) are frequently used for series generation and traversing hierarchical or tree-structured data.
本文作为MySQL使用指南
的延申讨论
As mentioned previously, recursive common table expressions (CTEs) are frequently used for series generation and traversing hierarchical or tree-structured data.
mycli
BlackLivesMatter
We value the diversity of our community. We strive to amplify the voices of the oppressed to eradicate racism and xenophobia. We ask our community to stand together in support of the Black community.
MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.
- Source: https://github.com/dbcli/mycli
- Bug tracker: https://github.com/dbcli/mycli/issues
(注意, 可以直接输入密码)
mycli
, 一款支持自动补全代码的命令工具, 支持ssh
, 以及更多细节的优化, 如大量结果不会一次全部返回, 危险操作提示等.
本文是作为MySQL使用指南
一文的进一步细节延申和补充.
(由于Typora的字数超过2万速度会明显下降, 4万字已经出现卡顿, 这里将更多内容拆出来讨论).
# 创建测试的表
drop table if exists test_w;
create table test_w (
id int UNSIGNED not null PRIMARY key auto_increment,
grade float UNSIGNED not null,
birth_date date not null,
s_name varCHAR(15) not null,
address varchar(16) not null
);
new features:
index
完善对numpy
数据类型的支持pyarrow
数据类型的支持Copy-on-Write
)性能What’s new in 2.0.0 (March XX, 2023)
These are the changes in pandas 2.0.0. See Release notes for a full changelog including other versions of pandas.
简化, 并不是逐句翻译, 只关注重点部分, 部分内容加入了自己的理解.
索引和数据选取.
The axis labeling information in pandas objects serves many purposes:
轴标签信息在pandas
对象中有多个用途:
In this section, we will focus on the final point: namely, how to slice, dice, and generally get and set subsets of pandas objects. The primary focus will be on Series and DataFrame as they have received more development attention in this area.
在这部分中, 将着重讨论最后一点, 如何对pandas的对象进行切片获取其中的部分数据(即读写操作). 这是pandas
的开发优先关注的.
在使用pandas
进行处理数据时, 时不时会出现一个异常的警告(注意这不是错误)
C:\Users\Lian\AppData\Local\Temp/ipykernel_15272/2330773252.py:4: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy tmp['c'] = tmp['a'] + tmp['b']
TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.
在了解这个文件格式前, 需要了解以下配置文件的常见格式.
windows
上相对流行.json
的扩展版), 但是可阅读性较差?书写规条较多?.简而言之, 作为一个好用的配置文件, 既需要数据易于存储/读取(同时需要有效数据密度高), 同时也需要有较好的阅读体验. 以json为例, 假如不进行格式化, 将难以阅读其内容.
而Toml
就号称满足上述要求:
TOML 旨在成为一个语义明显且易于阅读的最小化配置文件格式.TOML 被设计成可以无歧义地映射为哈希表.TOML 应该能很容易地被解析成各种语言中的数据结构.
目前主流的语言多已支持这种文件格式, 详情见v1.0.0 compliant