Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyb1992 authored Dec 1, 2019
1 parent c5beeb6 commit 039f58b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ ep.to_es(df, index, doc_type=doc_type, use_index=True)
time.sleep(10)
# Example of read data from es
df = ep.to_pandas(index, doc_type=doc_type)
df = ep.to_pandas(index)
print(df.head())
# return certain fields in es
heads = ['Num', 'Date']
df = ep.to_pandas(index, heads=heads, doc_type=doc_type)
df = ep.to_pandas(index, heads=heads)
print(df.head())
# set certain columns dtype
dtype = {'Num': 'float', 'Alpha': object}
df = ep.to_pandas(index, dtype=dtype, doc_type=doc_type)
df = ep.to_pandas(index, dtype=dtype)
print(df.dtypes)
# delete records from es
ep.delete_es(df.iloc[0:10, :], index, doc_type)
ep.delete_es(df.iloc[0:10, :], index)
df2 = pd.DataFrame({'Alpha': [chr(i) for i in range(97, 129)],
Expand Down

0 comments on commit 039f58b

Please sign in to comment.