Skip to content

Commit 98ddf3b

Browse files
authored
Update pytables.py
1 parent 4257ad6 commit 98ddf3b

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

pandas/io/pytables.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,12 @@ def put(
11701170
complevel : int, 0-9, default None
11711171
Specifies a compression level for data.
11721172
A value of 0 or None disables compression.
1173-
min_itemsize : int, dict, or None
1174-
Dict of columns that specify minimum str sizes.
1173+
min_itemsize : int, dict, or None, default None
1174+
Refers to the minimum size for string columns in bytes.
1175+
When the format = 'table'.
1176+
Since this specifies the byte length after encoding,
1177+
multi-byte characters need to be calculated using
1178+
their encoded byte length rather than character count.
11751179
nan_rep : str
11761180
Str to use as str nan representation.
11771181
data_columns : list of columns or True, default None
@@ -1203,6 +1207,9 @@ def put(
12031207
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
12041208
>>> store = pd.HDFStore("store.h5", "w") # doctest: +SKIP
12051209
>>> store.put("data", df) # doctest: +SKIP
1210+
1211+
>>> The word 'hello' = 5 bytes
1212+
>>> Japanese character "勉" = 2 bytes
12061213
"""
12071214
if format is None:
12081215
format = get_option("io.hdf.default_format") or "fixed"
@@ -1330,8 +1337,12 @@ def append(
13301337
A value of 0 or None disables compression.
13311338
columns : default None
13321339
This parameter is currently not accepted, try data_columns.
1333-
min_itemsize : int, dict, or None
1334-
Dict of columns that specify minimum str sizes.
1340+
min_itemsize : int, dict, or None, default None
1341+
Refers to the minimum size for string columns in bytes.
1342+
When the format = 'table'.
1343+
Since this specifies the byte length after encoding,
1344+
multi-byte characters need to be calculated using
1345+
their encoded byte length rather than character count.
13351346
nan_rep : str
13361347
Str to use as str nan representation.
13371348
chunksize : int or None
@@ -1377,6 +1388,9 @@ def append(
13771388
1 3 4
13781389
0 5 6
13791390
1 7 8
1391+
1392+
>>> The word 'hello' = 5 bytes
1393+
>>> Japanese character "勉" = 2 bytes
13801394
"""
13811395
if columns is not None:
13821396
raise TypeError(

0 commit comments

Comments
 (0)