
数据研发
yuxiaoyanran2020
这个作者很懒,什么都没留下…
展开
-
数据库-表情符号正确插入时,数据库需要改的格式
以下字段全改成utf8格式原创 2022-01-05 13:36:27 · 427 阅读 · 0 评论 -
python 列表:字符串变浮点型 数据框架类型转变
数字字符串列表 ——> 数字浮点型列表a = ['2', '3.5', '10', '88', '32.66']b =list(map(float, a))print(b)[2.0, 3.5, 10.0, 88.0, 32.66]原创 2021-08-05 14:27:08 · 441 阅读 · 0 评论 -
ODPS SQL筛选空字符串和空值
筛选空值where column.name is null筛选非空值where column.name is not null筛选空字符串where LENGTH(trim(column.name)) = 0筛选非空字符串where LENGTH(trim(column.name)) > 0筛选非空值且非空字符串where column.name is not nulland LENGTH(trim(column.name)) > 0...原创 2021-08-04 10:08:09 · 2953 阅读 · 0 评论 -
python实现TF-IDF
corpus = [ 'This is the first document.', 'This document is the second document.', 'And this is the third one.', 'Is this the first document?']from sklearn.feature_extraction.text import TfidfVectorizerimport pandas as pdtfidf = TfidfVectorizer()原创 2021-07-17 23:03:17 · 258 阅读 · 0 评论 -
数仓导入维表注意事项
1、除了时间没有其他类型,不需要导入框架SELECT a.date_id ,nvl(b.income_count,0)FROM dim_date a LEFT JOIN ( SELECT day_id ,sum(income_count) as income_count FROM dwd_income_channel_df GROUP BY day_id ) b ON a.d原创 2021-06-11 17:47:28 · 117 阅读 · 1 评论 -
精确到天的月环比—利用参数
CREATE TABLE IF NOT EXISTS ads_mon_ratio_df( current_date string COMMENT '当前日期', current_month_income bigint COMMENT '当前月截止昨天累计收入', current_month_income_ratio DECIMAL COMMENT "收入月份环比") COMMENT '收入-月环比统计表'原创 2021-06-11 13:33:33 · 282 阅读 · 0 评论 -
SQL:将表中一列拆成两列
计算tableA表中type列有两种类型,计算每个id的每种类型的count和 id type count 1 1 10 2 2 5 1 1 8 4 2 9方法:select id ,sum(case when type=1 then count end) as income ,s原创 2021-06-09 14:46:03 · 2775 阅读 · 0 评论 -
mysql数据库如何查询表中所有字段名,快速select
1.查看全部select * from information_schema.columns where table_name="表名" and table_schema="数据库名";2、以逗号连接,直接可用select group_concat(COLUMN_NAME) from information_schema.columns where table_name="表名" and table_schema="数据库名";...原创 2021-05-06 18:53:13 · 2358 阅读 · 2 评论 -
EXCEL、navicate数据库如何选中多行,且不用鼠标拖拽
1、打开表2、先选中起始行3、按住键盘的Shift键4、拖动右侧的滚动条5、选中终止行6、松开键盘的Shift键原创 2021-05-06 18:26:58 · 2310 阅读 · 0 评论 -
如何更新一张表的某一列,使其与另一张表对应
文章目录一、update二、update join一、updateUPDATE tableA a,tableB b set a.corporation_id = b.company_id, a.corporation_name = b.company_name, a.brand_id = b.brand_id, a.brand_name = b.brand_name, a.series_id = b.series_id, a.series_name = b.series_nam原创 2021-05-06 17:37:49 · 825 阅读 · 0 评论