小编Ann*_*nna的帖子

如何从SAS中的目录和子目录(包括路径和数据集名称)获取所有列名称

我需要列出目录和子目录中所有表的所有列名称。

但是,我尝试使用dictionary.columns,但未在子目录中显示数据集

这是代码

create table Kiwi.summarytablecolumns as select * from 
dictionary.columns where libname="Kiwi";
;
quit;
Run Code Online (Sandbox Code Playgroud)

我需要的是这样的:

表名|列名| 路径|

directory path sas subdirectory

5
推荐指数
0
解决办法
90
查看次数

来自列值和正则表达式的 Pyspark 字符串模式

嗨,我有 2 列的数据框:

+----------------------------------------+----------+
|                  Text                  | Key_word |
+----------------------------------------+----------+
| First random text tree cheese cat      | tree     |
| Second random text apple pie three     | text     |
| Third random text burger food brain    | brain    |
| Fourth random text nothing thing chips | random   |
+----------------------------------------+----------+
Run Code Online (Sandbox Code Playgroud)

我想生成第 3 列,其中一个单词出现在文本中的 key_word 之前。

+----------------------------------------+----------+-------------------+--+
|                  Text                  | Key_word | word_bef_key_word |  |
+----------------------------------------+----------+-------------------+--+
| First random text tree cheese cat      | tree     | text              |  |
| …
Run Code Online (Sandbox Code Playgroud)

regex pattern-matching pyspark callable-object

4
推荐指数
1
解决办法
7570
查看次数