10 lines
290 B
Python
10 lines
290 B
Python
|
import os
|
||
|
import pandas as pd
|
||
|
from pathlib import Path
|
||
|
|
||
|
|
||
|
def append_col_inode(df: pd.DataFrame) -> pd.DataFrame:
|
||
|
col_inode = df.apply(lambda x: os.stat(x).st_nlink,
|
||
|
axis=1,
|
||
|
columns=['path'])
|
||
|
return df.assign(inode = col_inode)
|