-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesRegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas version
Milestone
Description
Python版本: 3.6.5
版本:pandas == 0.24.2
import pandas as pd
Data = [
["A", "A", "A"],
["B", "B", "B"],
["C", "C", "C"],
["D", "D", "D"],
]
test1 = pd.DataFrame(Data)
print(test1)
print("------------")
test1 = test1.reindex([0, 1, 2, 3, 4, 5], method="ffill", limit=1)
print(test1)
limit参数限制数据继续向后填充
版本:pandas==0.25.1
import pandas as pd
Data = [
["A", "A", "A"],
["B", "B", "B"],
["C", "C", "C"],
["D", "D", "D"],
]
test1 = pd.DataFrame(Data)
print(test1)
print("------------")
test1 = test1.reindex([0, 1, 2, 3, 4, 5], method="ffill", limit=1)
print(test1)
limit参数并没有限制数据继续向后填充
Metadata
Metadata
Assignees
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesRegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas version