Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jbogaardt/xlcompose
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bogaardt committed Dec 16, 2019
2 parents 78e2980 + 5a58ec6 commit 9a71670
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion xlcompose/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__version__ = '0.1.3'
from xlcompose.core import (
DataFrame, Series, Row, Column, Tabs, CSpacer, RSpacer, Title, Image, Sheet)
DataFrame, Series, Row, Column, Tabs, CSpacer, RSpacer, Title, Image,
Sheet, VSpacer, HSpacer)
11 changes: 9 additions & 2 deletions xlcompose/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def format_validation(self, formats):


class RSpacer(DataFrame):
""" Convenience class to create a horizontal spacer """
""" Convenience class to create a vertical spacer in a Row container"""
def __init__(self, width=1, column_widths=2.25):
data = pd.DataFrame(dict(zip(list(range(width)), [' '] * width)),
index=[0])
Expand All @@ -466,8 +466,12 @@ def __init__(self, width=1, column_widths=2.25):
self.column_widths = [column_widths] * width


class Vspacer(RSpacer):
pass


class CSpacer(DataFrame):
""" Convenience class to create a vertical spacer """
""" Convenience class to create a horizontal spacer in a Column container"""
def __init__(self, height=1, column_widths=2.25):
data = pd.DataFrame({' ': [' '] * height})
temp = DataFrame(data, index=False, header=False)
Expand All @@ -476,6 +480,9 @@ def __init__(self, height=1, column_widths=2.25):
self.column_widths = [column_widths]


class HSpacer(CSpacer):
pass

class _Container():
""" Base class for Row and Column
"""
Expand Down

0 comments on commit 9a71670

Please sign in to comment.